call_user_func_array

mixed call_user_func_array(string function_name, [array argument_array]) 
function_name Function to be called
argument_array Array of arguments to be passed to function_name

Alternate method for calling functions.

Returns:

Return value of function_name ; if function_name is not a valid function name, the function generates a warning and no value is returned

Description:

call_user_func_array() is primarily useful as a way to dynamically call functions and methods at runtime without having to use eval(). call_user_func_array() passes the elements in argument_array to function_name as an argument list. This makes it easy to pass an unknown number of arguments to a function. See the example for details.

Normally, functions ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.