note 107428 deleted from function.call-user-func by tularis
| From: | tularis@php.net | Date: | Wed, 08 Feb 2012 17:14:17 +0000 |
| Subject: | note 107428 deleted from function.call-user-func by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-185911@lists.php.net to get a copy of this message | ||
Note Submitter: post at ddlab dot de
----
Even tough call_user_func works fine, I normally use another method, without calling another native
php function, like the following.
Instead of
call_user_func('foo','bar')
you may use
{'foo'}('bar')
It prevents you from error messages, in case you change functions into methods.
$classname->{'foo'}('bar') works.
$classname->call_user_func('foo','bar') doesn´t.