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
ktaglib_id3v2_attachedpictureframe(3) - php
intval(3) - php
boolval(3) - php
floatval(3) - php
reflectionproperty(3) - php
Similar Topics in the Unix Linux Community
how to get type of variable in perl
Perl variable type assessment
How to remove white spaces from the beginning an end of a string in unix?
String manpulation
Replace substring from a string variable