Add clarity to function calls inside interpolated values: doc about {${foo()}}

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@250326 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Etienne Kneuss 2008-01-10 16:09:42 +00:00
parent 44601265c6
commit dcbfeb28fe

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.192 $ -->
<!-- $Revision: 1.193 $ -->
<chapter xml:id="language.types" xmlns="http://docbook.org/ns/docbook">
<title>Types</title>
@ -1080,6 +1080,10 @@ echo "This works: " . $arr['foo'][3];
echo "You can even write {$obj->values[3]->name}";
echo "This is the value of the var named $name: {${$name}}";
echo "This is the value of the var named by the return value of getName(): {${getName()}}";
echo "This is the value of the var named by the return value of \$object->getName(): {${$object->getName()}}";
?>
]]>
<!-- maybe it's better to leave this out??
@ -1093,7 +1097,7 @@ echo "I'd like to have another {${ strrev('reeb') }}, hips";
<note>
<para>
Functions and method calls work since PHP 5.
Functions and method calls inside <literal>{$ }</literal> work since PHP 5.
</para>
</note>
<note>