|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52505 Define namespace relative to current (namespace) context
Submitted: 2010-07-31 10:03 UTC Modified: 2017-03-11 17:49 UTC
From: robert dot de dot wilde at online dot nl Assigned:
Status: Wont fix Package: Class/Object related
PHP Version: 5.3.3 OS: Any
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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
21 + 13 = ?
Subscribe to this entry?

 [2010-07-31 10:03 UTC] robert dot de dot wilde at online dot nl
Sometimes it would be usefull to be able to define namespace relative to the current namespace content, for example in case of includes/requires where the same .skel is used over and over. See test script.

Test script:
// global file
namespace MyNS\Usr\Models
      new MadMan\MadMansModel()  /* which refers to MyNs\Usr\Models\MadMan\MadMansModel */

// required file
namespace .\MadMan
   class MadMansModel
   {   // ..


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-31 10:04 UTC] robert dot de dot wilde at online dot nl
content > context
 [2010-12-01 15:32 UTC]
-Package: *Programming Data Structures +Package: Class/Object related
 [2017-03-11 17:49 UTC]
-Status: Open +Status: Wont fix
 [2017-03-11 17:49 UTC]
Namespaces in PHP are compile-time resolved, which necessitates them being strictly per-file -- includes are run-time operations. This is not going to change, so I'm marking this as Won't Fix.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 19 03:03:37 2021 UTC