call_user_method() function calls a user method on a specific object.
Note - This function is now deprecated.
call_user_method(method, obj, params)
Method - Method name
obj - The object on which the method is being called.
params - parameter array
Since call_user_method() is deprecated in PHP 4.1.0 and removed in PHP 7.0, use the following as an alternative solution -
call_user_func(array($obj, $method), $params);
The above is the detailed content of call_user_method() function in PHP. For more information, please follow other related articles on the PHP Chinese website!