|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2009-03-04 10:14 UTC] kalle@php.net
[2009-03-04 15:43 UTC] jimmy at basicmatrix dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 00:00:01 2025 UTC |
Description: ------------ call_user_func_array() claims it "Returns the function result, or FALSE on error." My testing shows it returns NULL if the callback function is not a valid callback. Reproduce code: --------------- <?php function callable() { return 'Good.'; } $return = call_user_func_array('callable',array()); var_dump($return); $return = call_user_func_array('not_callable',array()); var_dump($return); ?> Expected result: ---------------- string(5) "Good." Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'not_callable' was given in _______ on line 9 FALSE Actual result: -------------- string(5) "Good." Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'not_callable' was given in _______ on line 9 NULL