Hi Dan,

I'm not sure if i follow,
-> why not just do "return function() { $this->myPrivateMethod(); };" If
you really really need a closure to be returned that calls a private
method? because this should return a closure thats bound to the actual
object?
-> this should be easy enough to do userland, including checking if the
method exists
-> it might not be the best idea to use closures to call privates anyways
(think about the readability/maintainability of the code)

regards,
PP

2015-09-29 16:23 GMT+02:00 Dan Ackroyd <dan...@basereality.com>:

> Hello internals,
>
> I'd like to start a discussion of a proposal to allow closures to be
> created in user-land without having to use a whole lot of reflection
> code.
>
> https://wiki.php.net/rfc/closurefromcallable
>
> Thanks to Joe and Bob for the assistance in the patch.
>
> cheers
> Dan
> Ack
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Peter Petermann
ProtonMail: ppeterm...@protonmail.com (encrypted / based in .ch)
Email: ppeterman...@gmail.com - get my public PGP key from SKS Keyservers
PGP Key:
http://pool.sks-keyservers.net:11371/pks/lookup?op=get&search=0x0E6DBD675836A5C7

Reply via email to