php man page for strval

Query: strval

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

STRVAL(3)								 1								 STRVAL(3)

strval - Get string value of a variable

SYNOPSIS
string strval (mixed $var)
DESCRIPTION
Get the string value of a variable. See the documentation on string for more information on converting to string. This function performs no formatting on the returned value. If you are looking for a way to format a numeric value as a string, please see sprintf(3) or number_format(3).
PARAMETERS
o $var - The variable that is being converted to a string. $var may be any scalar type or an object that implements the __toString() method. You cannot use strval(3) on arrays or on objects that do not implement the __toString() method.
RETURN VALUES
The string value of $var.
EXAMPLES
Example #1 strval(3) example using PHP 5's magic __toString() method. <?php class StrValTest { public function __toString() { return __CLASS__; } } // Prints 'StrValTest' echo strval(new StrValTest); ?>
SEE ALSO
boolval(3), floatval(3), intval(3), settype(3), sprintf(3), number_format(3), Type juggling, __toString(). PHP Documentation Group STRVAL(3)
Related Man Pages
simplexmliterator(3) - php
gettype(3) - php
boolval(3) - php
directoryiterator(3) - php
reflectionparameter(3) - php
Similar Topics in the Unix Linux Community
How to count number of occurrences of a &quot;|&quot; from a variable?
how to get type of variable in perl
Variable inside a variable
How to remove white spaces from the beginning an end of a string in unix?
passing object to function, columns class