Doc #66004 [Csd]: Parse error in an example of the namespace section
| From: | admin at rafaelbarros dot eti dot br | Date: | Sat, 24 May 2014 01:50:10 +0000 |
| Subject: | Doc #66004 [Csd]: Parse error in an example of the namespace section | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-11242@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66004&edit=1
ID: 66004
User updated by: admin at rafaelbarros dot eti dot br
Reported by: admin at rafaelbarros dot eti dot br
Summary: Parse error in an example of the namespace section
Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Assigned To: bjori
Block user comment: N
Private report: N
New Comment:
E-mail changed.
Previous Comments:
------------------------------------------------------------------------
[2013-10-31 01:36:36] bjori@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Nice catch!
------------------------------------------------------------------------
[2013-10-31 01:36:26] bjori@php.net
Automatic comment from SVN on behalf of bjori
Revision: http://svn.php.net/viewvc/?view=revision&revision=332025
Log: Fixed bug#66004 (Parse error in an example of the namespace section)
------------------------------------------------------------------------
[2013-10-30 18:31:12] admin at rafaelbarros dot eti dot br
Description:
------------
Page: http://www.php.net/manual/en/language.namespaces.faq.php#language.namespaces.faq.quote
Example: "Example #9 Dangers of using namespaced names inside a double-quoted string"
There's a "Parse error": it shouldn't have a "new" clause before the
strings.
Test script:
---------------
$a = new "dangerous\name";
$obj = new $a;
$a = new 'not\at\all\dangerous';
$obj = new $a;
Actual result:
--------------
Parse error: syntax error, unexpected '"dangerous\name"'
(T_CONSTANT_ENCAPSED_STRING) in C:\xampp\htdocs\test\index.php on line 2
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66004&edit=1