Re: Inconsistencies in callable, call_user_func and direct variable calls

From: Date: Thu, 19 Mar 2015 16:17:50 +0000
Subject: Re: Inconsistencies in callable, call_user_func and direct variable calls
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-85217@lists.php.net to get a copy of this message
> 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);

« previous php.internals (#85217) next »