#46713 [Bgs]: Sub-namespace example lacks delimiter

From: Date: Fri, 28 Nov 2008 18:53:13 +0000
Subject: #46713 [Bgs]: Sub-namespace example lacks delimiter
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1561@lists.php.net to get a copy of this message
ID: 46713 Updated by: philip@php.net Reported By: mbr at arlsoft dot com Status: Bogus Bug Type: Documentation problem Operating System: Whatever php.net's server runs PHP Version: Irrelevant New Comment: Yeah, this bug is a little tricky to find because it's technically not a documentation problem but rather a fairly recent 5.3 highlight_string() is needed to understand namespace syntax while building the manual... Previous Comments: ------------------------------------------------------------------------ [2008-11-28 18:45:23] mbr at arlsoft dot com Before I reported this, I did search the bug-tracking system, but I didn't find bug #46710. Thanks for the pointer to the docs.php.net server. ------------------------------------------------------------------------ [2008-11-28 18:34:36] philip@php.net Duplicate of bug #46710 This will be fixed this upcoming Friday. You may use the docs.php.net server for now. http://docs.php.net/manual/en/language.namespaces.nested.php ------------------------------------------------------------------------ [2008-11-28 18:28:42] mbr at arlsoft dot com Description: ------------ Your documentation page at http://www.php.net/manual/en/language.namespaces.nested.php gives the following example use of the "namespace" keyword for declaring sub-namespaces: namespace MyProjectSubLevel; Below the example, it explains, "The above example creates constant MyProject\Sub\Level\CONNECT_OK, class MyProject\Sub\Level\Connection and function MyProject\Sub\Level\Connection." Yet the name of the namespace given in the example contains no delimiters. I don't see how the PHP interpreter can know that "MyProject" is the first level namespace, "Sub" is the second level namespace, and "Level" is the third level namespace. So I'm guessing that the line in the example is missing some delimiter. Given that many Unix tools use the character "\" to quote the following character, it seems possible that whoever wrote the documentation inserted a single backslash where what was needed was to have the backslash itself quoted by being preceded by another backslash. Please check and fix the documentation, and make it clear exactly which character PHP recognizes as the delimiter between multiple levels of a namespace hierarchy. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46713&edit=1

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