Fix doc bug #52897 (Strings variable parsing - complex syntax).

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@303666 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Adam Harvey 2010-09-22 08:31:49 +00:00
parent b85e508bd3
commit 683c98f646

View file

@ -586,14 +586,14 @@ echo "This square is $square->{width}00 centimeters broad.";
</simpara>
<simpara>
In fact, any value in the namespace can be included in a
<type>string</type> with this syntax. Simply write the expression the same
way as it would appear outside the <type>string</type>, and then wrap it
in <literal>{</literal> and <literal>}</literal>. Since
<literal>{</literal> can not be escaped, this syntax will only be
recognised when the <literal>$</literal> immediately follows the
<literal>{</literal>. Use <literal>{\$</literal> to get a literal
<literal>{$</literal>. Some examples to make it clear:
Any scalar variable, array variable or object property with a
<type>string</type> representation can be included via this syntax.
Simply write the expression the same way as it would appear outside the
<type>string</type>, and then wrap it in <literal>{</literal> and
<literal>}</literal>. Since <literal>{</literal> can not be escaped, this
syntax will only be recognised when the <literal>$</literal> immediately
follows the <literal>{</literal>. Use <literal>{\$</literal> to get a
literal <literal>{$</literal>. Some examples to make it clear:
</simpara>
<informalexample>