php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60170 Example contradicts explanation above
Submitted: 2011-10-29 18:35 UTC Modified: 2011-10-29 19:30 UTC
From: Laurent dot Lyaudet at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
31 + 45 = ?
Subscribe to this entry?

 
 [2011-10-29 18:35 UTC] Laurent dot Lyaudet at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/language.namespaces.rules
---
Unless I've misunderstood something, I think there is the following error in the manual:
In example 1, call to F(); is said to be resolved as \A\F() then \F() in case of failure. But it contradicts rule 2 above that said that this unqualified name should have been translated using import to \C\E().


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-29 19:30 UTC] Laurent dot Lyaudet at gmail dot com
-Status: Open +Status: Closed
 [2011-10-29 19:30 UTC] Laurent dot Lyaudet at gmail dot com
I forgot that import couldn't apply to functions and constants. The non-uniform behavior of import is quite a "non-feature".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 04:01:28 2024 UTC