Re: [RFC] Closure::call and Function Referencing as Closures
| From: | Thomas Bley | Date: | Mon, 04 Aug 2014 00:53:07 +0000 |
| Subject: | Re: [RFC] Closure::call and Function Referencing as Closures | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-76327@lists.php.net to get a copy of this message | ||
Hello Andrea,
from userland perspective, I would prefer to open the Closure constructor instead of adding new
syntax:
$qux = new FooBar(3);
// $func = &FooBar::getStatic;
$func = new Closure(array('FooBar', 'getStatic'));
$func($qux); // 3
Regards
Thomas
Andrea Faulds wrote on 03.08.2014 23:50:
> Good evening,
>
> I am proposing two new RFCs. As they are both inter-related and complementary,
> with the second having the first as a prerequisite, I’m making just a single
> email to cover both:
>
> https://wiki.php.net/rfc/closure_apply
> https://wiki.php.net/rfc/function_referencing
>
> Both have written, tested and working patches aimed for master.
>
> Thoughts appreciated, thanks.
> --
> Andrea Faulds
> http://ajf.me/
>
>
>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>