note 107428 added to function.call-user-func

From: Date: Wed, 08 Feb 2012 17:03:51 +0000
Subject: note 107428 added to function.call-user-func
Groups: php.notes 
Request: Send a blank email to php-notes+get-185909@lists.php.net to get a copy of this message
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. ---- Server IP: 69.147.83.197 Probable Submitter: 78.53.82.223 ---- Manual Page -- http://www.php.net/manual/en/function.call-user-func.php Edit -- https://master.php.net/note/edit/107428 Del: integrated -- https://master.php.net/note/delete/107428/integrated Del: useless -- https://master.php.net/note/delete/107428/useless Del: bad code -- https://master.php.net/note/delete/107428/bad+code Del: spam -- https://master.php.net/note/delete/107428/spam Del: non-english -- https://master.php.net/note/delete/107428/non-english Del: in docs -- https://master.php.net/note/delete/107428/in+docs Del: other reasons-- https://master.php.net/note/delete/107428 Reject -- https://master.php.net/note/reject/107428 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#185909) next »