svn: /phpdoc/en/trunk/reference/var/functions/ strval.xml

From: Date: Tue, 20 Jul 2010 13:56:33 +0000
Subject: svn: /phpdoc/en/trunk/reference/var/functions/ strval.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-6900@lists.php.net to get a copy of this message
rquadling Tue, 20 Jul 2010 13:56:33 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=301421 Log: Strval var parameter updated to include objects implmenting a __toString() method. Fixes bug #52360 Bug: http://bugs.php.net/52360 (Verified) Strval documentation is unclear on whether it works on objects Changed paths: U phpdoc/en/trunk/reference/var/functions/strval.xml Modified: phpdoc/en/trunk/reference/var/functions/strval.xml =================================================================== --- phpdoc/en/trunk/reference/var/functions/strval.xml 2010-07-20 13:51:38 UTC (rev 301420) +++ phpdoc/en/trunk/reference/var/functions/strval.xml 2010-07-20 13:56:33 UTC (rev 301421) @@ -35,8 +35,11 @@ The variable that is being converted to a <type>string</type>. </para> <para> - <parameter>var</parameter> may be any scalar type. You cannot use - <function>strval</function> on arrays or objects. + <parameter>var</parameter> may be any scalar type or an object that + implements the <link linkend="language.oop5.magic.tostring">__toString</link> + method. You cannot use <function>strval</function> on arrays or on + objects that do not implement the + <link linkend="language.oop5.magic.tostring">__toString</link> method. </para> </listitem> </varlistentry> @@ -55,7 +58,10 @@ &reftitle.examples; <para> <example> - <title><function>strval</function> example using PHP5's magic __toString method</title> + <title> + <function>strval</function> example using PHP5's magic + <link linkend="language.oop5.magic.tostring">__toString</link> method. + </title> <programlisting role="php"> <![CDATA[ <?php @@ -86,6 +92,7 @@ <member><function>sprintf</function></member> <member><function>number_format</function></member> <member><link linkend="language.types.type-juggling">Type juggling</link></member> + <member><link linkend="language.oop5.magic.tostring">__toString</link></member> </simplelist> </para> </refsect1>

« previous php.doc.cvs (#6900) next »