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

From: Date: Fri, 30 Nov 2012 12:26:23 +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-175049@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: florinpatan at gmail dot com 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 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! Previous Comments: ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ [2012-09-06 17:40:34] rayro at gmx dot de It would be nice to see this in future releases! ------------------------------------------------------------------------ [2011-08-08 16:13:17] steven_nikkel at ertyu dot org Would this prevent the keyword eval from being used within code being eval'd? That appears to be the bug I'm running into, even though the keyword is only used in contained javascript code, not php, even included as a comment it fails. ------------------------------------------------------------------------ [2011-07-26 15:56:42] info at strictcoding dot co dot uk +1 for this feature request! ------------------------------------------------------------------------ [2011-07-10 19:47:43] stas@php.net The patch seems not to work with tokenizer extension - the extension returns wrong tokens (T_EVAL instead of expected T_STRING). ------------------------------------------------------------------------ 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 (#175049) next »