Good afternoon,
I’m putting this RFC to a vote again as I haven’t heard any objections in the past three days, and in the event something’s been missed, one week would be long enough to spot it.
Vote is here: https://wiki.php.net/rfc/closure_apply#vote
It ends 2014-08-27. Thanks!
Andrea Faulds
http://ajf.me/
The only thing I'd suggest is like I said in the last email is to make the
syntax more like Closure::bind(Closure $closure, object $newThis, [mixed
$newScope = 'static']) and make it Closure::apply(mixed $newObjectOrScope
[, mixed ... $parameters]) $newObjectOrScope would then allow a user to
supply a class name or an object. If class name is passed you have access
to "static::", "self::", and "parent::" inside the function everything else
works as described in the RFC.
Give the ability to call a closure as a static method of a class or a
normal method of an object. Right now the only way to do it is doing
binding and creating new closures and calling those closures then
destroying them.
Good afternoon,
I’m putting this RFC to a vote again as I haven’t heard any objections in
the past three days, and in the event something’s been missed, one week
would be long enough to spot it.Vote is here: https://wiki.php.net/rfc/closure_apply#vote
It ends 2014-08-27. Thanks!
Andrea Faulds
http://ajf.me/
The only thing I'd suggest is like I said in the last email is to make the
syntax more like Closure::bind(Closure $closure, object $newThis, [mixed
$newScope = 'static']) and make it Closure::apply(mixed $newObjectOrScope
[, mixed ... $parameters]) $newObjectOrScope would then allow a user to
supply a class name or an object. If class name is passed you have access
to "static::", "self::", and "parent::" inside the function everything else
works as described in the RFC.Give the ability to call a closure as a static method of a class or a
normal method of an object. Right now the only way to do it is doing
binding and creating new closures and calling those closures then
destroying them.
I think you are confused. This proposal basically binds the closure to
the new object and invokes it immediately. I genuinely don't see how
it being statically bound to the object will make a difference. Please
elaborate.
I suppose calling it statically a user would probably want to recycle the
same function/closure, so binding/calling it real time would have little
impact if done properly.
The only thing I'd suggest is like I said in the last email is to make
the
syntax more like Closure::bind(Closure $closure, object $newThis, [mixed
$newScope = 'static']) and make it Closure::apply(mixed $newObjectOrScope
[, mixed ... $parameters]) $newObjectOrScope would then allow a user to
supply a class name or an object. If class name is passed you have access
to "static::", "self::", and "parent::" inside the function everything
else
works as described in the RFC.Give the ability to call a closure as a static method of a class or a
normal method of an object. Right now the only way to do it is doing
binding and creating new closures and calling those closures then
destroying them.I think you are confused. This proposal basically binds the closure to
the new object and invokes it immediately. I genuinely don't see how
it being statically bound to the object will make a difference. Please
elaborate.
I’m putting this RFC to a vote again as I haven’t heard any objections in the past three days, and in the event something’s been missed, one week would be long enough to spot it.
Vote is here: https://wiki.php.net/rfc/closure_apply#vote
It ends 2014-08-27. Thanks!
Voting has ended. With 13 votes in favour and none against, the RFC is accepted. Unfortunately, as it affects /Zend, I don’t have the karma to merge this myself. I updated the pull request to work with int64.
The pull request can be found here: https://github.com/php/php-src/pull/775
Thanks!
Andrea Faulds
http://ajf.me/