Req #71678 [Opn->Sus]: class() extends self
| From: | stas@php.net | Date: | Sat, 05 Aug 2017 04:37:48 +0000 |
| Subject: | Req #71678 [Opn->Sus]: class() extends self | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210504@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71678&edit=1
ID: 71678
Updated by: stas@php.net
Reported by: php at thekid dot de
Summary: class() extends self
-Status: Open
+Status: Suspended
Type: Feature/Change Request
Package: Scripting Engine problem
Operating System: Windows
PHP Version: 7.0.3
Block user comment: N
Private report: N
New Comment:
Thank you for your interest in PHP and for submitting a feature request. Please be aware that due to
the magnitude of change this request requires, it would be necessary to discuss it on PHP Internals
list (internals@lists.php.net) as an RFC. Please read the guide about creating RFCs here:
https://wiki.php.net/rfc/howto
If you haven't had experience with writing RFCs before, it is advised to seek guidance on the
Internals list (http://php.net/mailing-lists.php) and/or solicit help from one of the experienced
developers.
Please to not consider this comment as a negative view on the merits of your proposal - every
proposal which requires changes of certain magnitude, even the very successful and widely supported
ones, must be done through the RFC process. This helps make the process predictable, transparent and
accessible to all developers.
Previous Comments:
------------------------------------------------------------------------
[2017-01-29 07:33:47] krakjoe@php.net
For this kind of change, an RFC is required.
Please see http://wiki.php.net/rfc/howto
------------------------------------------------------------------------
[2016-07-14 09:44:04] dmitry@php.net
This is not a bug, but a feature request.
------------------------------------------------------------------------
[2016-02-27 17:09:55] thekid@php.net
Same goes for "parent"
------------------------------------------------------------------------
[2016-02-27 17:08:13] php at thekid dot de
Description:
------------
Anonymous class syntax doesn't work with "self" keyword.
Test script:
---------------
class T {
static function new() {
return new class() extends self { };
}
}
var_dump(T::new());
Expected result:
----------------
object(class@anonymous)#1 (0) {
}
Actual result:
--------------
Fatal error: Cannot use 'self' as class name as it is reserved in Command line code on
line 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71678&edit=1