On Thursday 19 March 2015 18:17:50 S.A.N wrote:
> > Then how would you write an callback containing an already constructed
> > object? $a = [$object, 'method'];
> >
> > The alternative is unnecessarily cumbersome:
> > $a = function($methodArg1, $methodArg2) use($object) { return
> > $object->method($methodArg1, $methodArg2); };
>
> $object->$methodName(...$args);
That's a call. Requested was an assignment. You cannot assign that and pass it
around for later calling. You cannot pass that as a callable parameter.
Patrick