note 95814 added to function.call-user-func-array
| From: | kweejee at gmail dot com | Date: | Sat, 23 Jan 2010 04:04:32 +0000 |
| Subject: | note 95814 added to function.call-user-func-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-165225@lists.php.net to get a copy of this message | ||
I recently had
<?php
call_user_func_array('MyClass::myFunction', array(0, 10));
?>
working on my home server, but when I uploaded it to a host with a different version of PHP it
stopped working and gave the error message "call_user_func_array()
[function.call-user-func-array]: Unable to call MyClass::myFunction()" The solution I found was
to use this instead:
<?php
call_user_func_array(array('MyClass', 'myFunction'), array(0, 10));
?>
----
Server IP: 64.71.164.2
Probable Submitter: 24.2.78.202
----
Manual Page -- http://www.php.net/manual/en/function.call-user-func-array.php
Edit -- https://master.php.net/note/edit/95814
Del: integrated -- https://master.php.net/note/delete/95814/integrated
Del: useless -- https://master.php.net/note/delete/95814/useless
Del: bad code -- https://master.php.net/note/delete/95814/bad+code
Del: spam -- https://master.php.net/note/delete/95814/spam
Del: non-english -- https://master.php.net/note/delete/95814/non-english
Del: in docs -- https://master.php.net/note/delete/95814/in+docs
Del: other reasons-- https://master.php.net/note/delete/95814
Reject -- https://master.php.net/note/reject/95814
Search -- https://master.php.net/manage/user-notes.php