PHP strval() Function
strval() The function is used to get the string value of a variable.
PHP version requirement: PHP 4, PHP 5, PHP 7
Syntax
string strval ( mixed $var )
Parameter Description:
- $var: can be any scalar type, but cannot be an array or object.
Return Value
Returns a string.
Example
Example
The output is:
int(123)
string(3) "123"
Available PHP Functions