Edit report at https://bugs.php.net/bug.php?id=64235&edit=1
ID: 64235 Patch added by: larue...@php.net Reported by: imenem at inox dot ru Summary: Insteadof not work for class method in 5.4.11 Status: Feedback Type: Bug Package: Scripting Engine problem Operating System: Debian GNU/Linux PHP Version: 5.4.11 Assigned To: dmitry Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: bug64235.patch Revision: 1361347678 URL: https://bugs.php.net/patch-display.php?bug=64235&patch=bug64235.patch&revision=1361347678 Previous Comments: ------------------------------------------------------------------------ [2013-02-20 08:04:11] dmi...@php.net It's hard to say what is expected :) I thought only traits may be used in context of "insteadof", now I'm not sure. I sent the question to Stefan Marr. Lets wait for his opinion. ------------------------------------------------------------------------ [2013-02-20 08:00:02] re...@php.net insteadof and 'as' bother for traits, I thought after the trait refactor, it's works as expected. If we keep 'insteadof' could been used for class method as feature I'm fine:0 ------------------------------------------------------------------------ [2013-02-20 07:58:32] dmi...@php.net Yet another traits mess :( I suppose, it worked in 5.4.4 because of mistake. RFC and traits documentation don't say if class names may be used in context of "as" and "insteadof" operators. In my opinion, class names must not be used in contest of "as". However, their usage in context of "inseadof" may make sense (I'm not sure). Anyway, it has to be defined in documentation first. ------------------------------------------------------------------------ [2013-02-20 07:44:12] larue...@php.net fix attached, which fix this bug, and trigger fatal error in compile time for the test script I pasted before. ------------------------------------------------------------------------ [2013-02-20 07:41:23] larue...@php.net The following patch has been added/updated: Patch Name: bug64235.phpt Revision: 1361346083 URL: https://bugs.php.net/patch-display.php?bug=64235&patch=bug64235.phpt&revision=1361346083 ------------------------------------------------------------------------ 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=64235 -- Edit this bug report at https://bugs.php.net/bug.php?id=64235&edit=1