svn: /phpdoc/en/trunk/language/types/ string.xml
| From: | Christoph Michael Becker | Date: | Tue, 14 Jun 2016 13:42:53 +0000 |
| Subject: | svn: /phpdoc/en/trunk/language/types/ string.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-14185@lists.php.net to get a copy of this message | ||
cmb Tue, 14 Jun 2016 13:42:53 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=339345
Log:
Fix #53614: Strings variable parsing - problematic example among complex syntax examples
Bug: https://bugs.php.net/53614 (Verified) Strings variable
parsing - problematic example among complex syntax examples
Changed paths:
U phpdoc/en/trunk/language/types/string.xml
Modified: phpdoc/en/trunk/language/types/string.xml
===================================================================
--- phpdoc/en/trunk/language/types/string.xml 2016-06-14 12:08:00 UTC (rev 339344)
+++ phpdoc/en/trunk/language/types/string.xml 2016-06-14 13:42:53 UTC (rev 339345)
@@ -516,6 +516,8 @@
echo "He drank some $juice juice.".PHP_EOL;
// Invalid. "s" is a valid character for a variable name, but the variable is $juice.
echo "He drank some juice made of $juices.";
+// Valid. Explicitly specify the end of the variable name by enclosing it in braces:
+echo "He drank some juice made of ${juice}s."
?>
]]>
</programlisting>
@@ -524,6 +526,7 @@
<![CDATA[
He drank some apple juice.
He drank some juice made of .
+He drank some juice made of apples.
]]>
</screen>
</informalexample>
@@ -614,7 +617,6 @@
// Works, outputs: This is fantastic
echo "This is {$great}";
-echo "This is ${great}";
// Works
echo "This square is {$square->width}00 centimeters broad.";