Re: Could we kill call_user_func?

From: Date: Fri, 15 Mar 2013 16:10:37 +0000
Subject: Re: Could we kill call_user_func?
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-66654@lists.php.net to get a copy of this message
Am 15.3.2013 um 16:59 schrieb Anthony Ferrara <ircmaxell@gmail.com>: > Bob, > > call_user_func is not call_user_func_array > > call_user_func($func) is the same as $func(). In any way. > > Not in any way. call_user_func accepts any expression for the function to call. > $func() only accepts callables. > > Example: > > call_user_func(getCallback()); > getCallback()(); // <-- syntax error. > > You *could* solve it with variable foo: > > ${'_'.!$_=getCallback()}(); > > But I'd stick to call_user_func()... Hey, why not enable then this "getCallback()();"? but yes, call_user_func should remain there alone in the combination with call_user_func_array. Bob Weinand

« previous php.internals (#66654) next »