Repository navigation
Conversation
|
Tested and it looks good. However it's a big behavior change, despite it's bug. On that note it might have more sense this patch to go into master only. |
There was a problem hiding this comment.
This is very old comment from 2001.
All overload logic was moved to zend_is_callable_check_class() by Dmitry Stogonov in 2008, when LSB was merget.
In fact, this comment very confusing, so I decided to remove it.
|
This patch introduces a BC break as and such can not be merged into 5.4 (and I'm not sure if at all). Test code: Without the patch: with the patch: BC break and I'm not sure it's even right to call B's function when given C object. Note there's no "parent" in this example for call_user_func_array. |
|
Also note that this would change a scope on the call even if we used not $this but any other object from the same class hierarchy, which also sounds wrong. |
|
Oh, of course, overseen that ... while expanding the limitation of 'self' it breaks $this. |
|
Comment on behalf of stas at php.net: Closing pull for now as it produces BC break, please reopen or submit new pull with fixed code. |
|
Guys, thank you for taking time and viewing my code. |
When using call_user_function() with parent::, self:: or static:: prefix we need to check current class scop, or result well be unexpected.