在Python中我可以这样做:
def f(a, b, c):
print a, b, c
f(*[1, 2, 3])
Run Code Online (Sandbox Code Playgroud)
用PHP怎么说?
call_user_func_array('f', array(1, 2, 3));
Run Code Online (Sandbox Code Playgroud)
如果你想调用一个类方法,你可以使用array($instance, 'f')而不是,'f'如果它是你使用的静态类函数array('ClassName', 'f')或'ClassName::f'.有关详细信息,请参阅回调类型文档.