Use call_user_func_array :
call_user_func_array('f', array(1, 2, 3));
If you want to call a class method, you must use array($instance, 'f') instead of 'f' , and if it were a static class function, you would use array('ClassName', 'f') or 'ClassName::f' . You can learn more about this in the callback methods .
source share