Re: Deprecation of func_get_args(), call_user_func_array() and related API
| From: | Marco Pivetta | Date: | Mon, 13 Oct 2014 20:26:22 +0000 |
| Subject: | Re: Deprecation of func_get_args(), call_user_func_array() and related API | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-77939@lists.php.net to get a copy of this message | ||
On 13 October 2014 21:18, Marc Bennewitz <php@mabe.berlin> wrote:
>
> On 13.10.2014 20:48, Marco Pivetta wrote:
>
> On 13 October 2014 20:20, Marc Bennewitz <php@mabe.berlin> wrote:
>
>>
>> On 13.10.2014 02:45, Marco Pivetta wrote:
>>
>> Your implementation of "userland_call_user_func" doesn't have the same
>> visibility as "call_user_func[_array]":
>> http://3v4l.org/lNgub
>
>
> Interesting: this seems to show that it's even more magic than I
> expected.
>
> Here's just a hacked-together example, just to show that it can be done
> in userland as well (there may be better ways):
> http://3v4l.org/QuQM1#v560
>
> Now you have the opposite issue - you are able to call private/protected
> methods but you shouldn't:
> http://3v4l.org/rgmh8#v560
>
>
Good catch, but I'm not trying to build a complete solution in a gist: if I
do, then I'll just make a lib and include all existing
.phpt tests
related to call_user_func, no? :-)
Just a revision of the userland version, for fun: http://3v4l.org/6IKKl#v560
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/