|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #70834 Namespace name scalar with ::namespace
Submitted: 2015-11-02 11:03 UTC Modified: 2020-02-28 15:04 UTC
From: office at maslosoft dot com Assigned:
Status: Open Package: Scripting Engine problem
PHP Version: Irrelevant 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: office at maslosoft dot com
New email:
PHP Version: OS:


 [2015-11-02 11:03 UTC] office at maslosoft dot com
There is existing special constant, ie `Vendor\Package\ClassName::class`, as per RFC:

Requested feature:
There could be also namespace constant, which is anyway reserved, ie:

`Vendor\Package\ClassName::namespace` should resolve to string '\Vendor\Package\ClassName'

Could be used for any namespace related operation, like registering namespace for some purpose

Could interfere with token parsing scripts


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-02 11:04 UTC] office at maslosoft dot com
Typo, it should be:
`Vendor\Package\ClassName::namespace` should resolve to string '\Vendor\Package'
 [2020-02-28 15:04 UTC]
-Package: Reflection related +Package: Scripting Engine problem
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu May 13 02:01:23 2021 UTC