Doc #66004 [Opn->Csd]: Parse error in an example of the namespace section

From: Date: Thu, 31 Oct 2013 01:36:37 +0000
Subject: Doc #66004 [Opn->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-10569@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 Updated by: bjori@php.net Reported by: admin at wmfoi dot com dot br Summary: Parse error in an example of the namespace section -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: bjori Block user comment: N Private report: N New Comment: 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! Previous Comments: ------------------------------------------------------------------------ [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 wmfoi dot com 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

« previous php.doc.bugs (#10569) next »