← All built-ins / strval()

strval()

strval(mixed $number): string

Parameters

NameTypeDescription
$vmixedvalue to convert

Return value

The string representation.

Example

echo strval(42) . "!", "
";
echo strval(1.5), "
";
42!
1.5

See also

intval()sprintf()