note 109357 added to function.call-user-func-array

From: Date: Tue, 10 Jul 2012 04:42:12 +0000
Subject: note 109357 added to function.call-user-func-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-189084@lists.php.net to get a copy of this message
For anyone looking for the means to test for the first parameter before passing to this function, look at the is_callable (http://php.net/manual/en/function.is-callable.php) variable handler. <?php $handler = array( 'MyClass', 'MyMethod'); $params = array(1,2,3,4); if ( is_callable($handler) ) { call_user_func_array( $handler , $params ); } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 80.250.49.83 ---- Manual Page -- http://www.php.net/manual/en/function.call-user-func-array.php Edit -- https://master.php.net/note/edit/109357 Del: integrated -- https://master.php.net/note/delete/109357/integrated Del: useless -- https://master.php.net/note/delete/109357/useless Del: bad code -- https://master.php.net/note/delete/109357/bad+code Del: spam -- https://master.php.net/note/delete/109357/spam Del: non-english -- https://master.php.net/note/delete/109357/non-english Del: in docs -- https://master.php.net/note/delete/109357/in+docs Del: other reasons-- https://master.php.net/note/delete/109357 Reject -- https://master.php.net/note/reject/109357 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#189084) next »