|  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: 2015-11-02 11:04 UTC
From: office at maslosoft dot com Assigned:
Status: Open Package: Reflection related
PHP Version: Irrelevant 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:
20 - 8 = ?
Subscribe to this entry?

 [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'
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Feb 17 22:01:25 2020 UTC