Home >Backend Development >PHP Tutorial >call_user_method_array() function in PHP
The call_user_method_array() function calls a user method given an array of parameters.
Note - This function is now deprecated.
call_user_method_array(method, obj, params)
Method - Method name
obj - The object on which the method is being called.
params - Parameter array
Since call_user_method_array() in PHP 4.1.0 is deprecated and removed in PHP 7.0, so use the following as an alternative solution -
call_user_func_array(array($obj, $method), $params);
The above is the detailed content of call_user_method_array() function in PHP. For more information, please follow other related articles on the PHP Chinese website!