On 13.10.2014 22:26, Marco Pivetta wrote:
> On 13 October 2014 21:18, Marc Bennewitz <php@mabe.berlin
> <mailto:php@mabe.berlin>> wrote:
>
>
>     On 13.10.2014 20:48, Marco Pivetta wrote:
>>     On 13 October 2014 20:20, Marc Bennewitz <php@mabe.berlin
>>     <mailto: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
Sure, but it shows that it's not a simple two-liner to have a well
working solution in userland.
The more complicated it is the more error-prone it will be and btw. slow
down.

>
> Marco Pivetta
>
> http://twitter.com/Ocramius     
>
> http://ocramius.github.com/

Reply via email to