Req #70834 [Opn]: Namespace name scalar with ::namespace

From: Date: Mon, 02 Nov 2015 11:04:52 +0000
Subject: Req #70834 [Opn]: Namespace name scalar with ::namespace
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196973@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70834&edit=1 ID: 70834 User updated by: office at maslosoft dot com Reported by: office at maslosoft dot com Summary: Namespace name scalar with ::namespace Status: Open Type: Feature/Change Request Package: Reflection related Operating System: Any PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Typo, it should be: Vendor\Package\ClassName::namespace should resolve to string '\Vendor\Package' Previous Comments: ------------------------------------------------------------------------ [2015-11-02 11:03:01] office at maslosoft dot com Description: ------------ Background: There is existing special constant, ie Vendor\Package\ClassName::class, as per RFC: https://wiki.php.net/rfc/class_name_scalars Requested feature: There could be also namespace constant, which is anyway reserved, ie: Vendor\Package\ClassName::namespace should resolve to string '\Vendor\Package\ClassName' Pros: Could be used for any namespace related operation, like registering namespace for some purpose Cons: Could interfere with token parsing scripts ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70834&edit=1

« previous php.bugs (#196973) next »