Req #28261 [Com]: Lifting reserved keyword restriction for method names

From: Date: Thu, 08 Jan 2015 22:56:24 +0000
Subject: Req #28261 [Com]: Lifting reserved keyword restriction for method names
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189768@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=28261&edit=1 ID: 28261 Comment by: ajf@php.net Reported by: Philippe dot Jausions at 11abacus dot com Summary: Lifting reserved keyword restriction for method names Status: Open Type: Feature/Change Request Package: Scripting Engine problem Operating System: * PHP Version: * Block user comment: N Private report: N New Comment: There was an RFC for this that was rejected. Might be more possible now, especially with the AST. Previous Comments: ------------------------------------------------------------------------ [2014-02-03 16:59:15] chris dot baker dot gr at gmail dot com 10 years on from the original feature request, 7 years on from a workable patch, and I still can't make a class with a method named "list". I hate to be snarky, but come on guys. With other feature requests favored by spaghetti CMS author groups landing on a fast track, can we get this core OOP concept fixed for the rest of us? ------------------------------------------------------------------------ [2013-08-18 04:41:13] swivelgames at gmail dot com Absolutely agree. I've run into many instances where this would have been useful. Seems almost trivial why this is even needed as a feature request, honestly. Really hope this bug gets fixed soon :) Thanks for taking care of this guys! ------------------------------------------------------------------------ [2013-08-12 09:48:08] general-purpose at yandex dot ru Given that keyword named methods are working just fine already, there are now reason to forbid declaring them this way. +1 for fixing this. ------------------------------------------------------------------------ [2012-11-30 12:26:23] florinpatan at gmail dot com There are some libraries out there like AMQP/Gearman who have reserved keywords as method names and while they work just fine, it's impossible to extend them and overwrite those methods as the parser would just fail. While this is a known issue, with more and more PHP keywords being added and with PHP 5 promoting itself as being a OOP seasoned language, I see no reason for methods in class names to be so restricted. Thank you! ------------------------------------------------------------------------ [2012-11-02 22:17:55] nathan dot goulding+phpbugs at gmail dot com I agree that this is worthwhile and should be fixed. Ridiculing this suggestion (#14178 and #10743) are unfortunate and I haven't seen a well-reasoned argument why this is so awful. Hoping this eleven line patch can get integrated soon. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=28261 -- Edit this bug report at https://bugs.php.net/bug.php?id=28261&edit=1

« previous php.bugs (#189768) next »