Personally, I use call_user_func_array.
$result = call_user_func_array(array($objectInstance, 'objectMethod'), array('parameter one', 'parameter two'));
If the method is static, replace $objectInstancewith the name of the class you are using. You can also use standalone functions:
$result = call_user_func_array('functionName', array('parameter one', 'parameter two'));
Hope this makes sense ?:]
However, in the future try to show us what you have and haven’t done:]
source
share