On Sun, Oct 4, 2015 at 12:41 PM, Marco Pivetta <ocram...@gmail.com> wrote: > As mentioned already by Andrea: why not just a named constructor on the > closure class, like `Closure::fromCallable(callable $callable)`? > Much simpler, easier to find, etc etc... > On Sep 29, 2015 11:23, "Dan Ackroyd" <dan...@basereality.com> wrote: > >> 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 >> >>
Hello, and what about changing the empty ctor of Closure to __construct(callable $callable)? And the usage would be new Closure([$this, 'abc']);? Regards Pavel Kouřil -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php