|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: robert dot de dot wilde at online dot nl
New email:
PHP Version: OS:


 [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 Oct 17 08:03:35 2021 UTC