Edit report at https://bugs.php.net/bug.php?id=65429&edit=1

 ID:                 65429
 Updated by:         requi...@php.net
 Reported by:        1suming at sina dot com
 Summary:            call_user_func_array can't accept params correctly
-Status:             Open
+Status:             Duplicate
 Type:               Bug
 Package:            Unknown/Other Function
 Operating System:   windows
 PHP Version:        5.4.17
 Block user comment: N
 Private report:     N

 New Comment:

Duplicate of bug #65428


Previous Comments:
------------------------------------------------------------------------
[2013-08-09 16:48:36] 1suming at sina dot com

Description:
------------
---
>From manual page: http://www.php.net/function.call-user-func-array#refsect1-
function.call-user-func-array-description
---
class Foo
{
         
        public function printArray(array $arr)
        {
                var_dump($arr);
        }
}

 
$foo1=new Foo();
call_user_func_array(array($foo1,'printArray'),array(1,2));
when I run,the result is
Catchable fatal error: Argument 1 passed to foo::printArray() must be of the 
type array, integer 

but when i change  call_user_func_array to call_user_func,it's ok.
Don't call_user_func_array   accept params?



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=65429&edit=1

Reply via email to