Is there something like JavaScript's apply function in PHP? Is there something like JavaScript's apply function in PHP? javascript javascript

Is there something like JavaScript's apply function in PHP?


You can use the function call_user_func_array. Simply pass in your function (as a callback, usually a string with the function name), and an array of arguments.

Additional note: for static functions, use forward_static_call_array.