call_user_func

(FW >= 1.0)

call_user_func - call a user-defined function

Description

mixed call_user_func( string function_name, [ parameters ] )
Calls a user defined function with optional parameters

Parameters

function_name

string containing the name of the user function to call

[ parameters ]

optional parameters to pass to the function

Return Value

The result of the function can be of any type depending on the way the function is set up

Examples

<? 

function my_add($x,$y) {
return $x+$y;
}
$result = call_user_func("my_add",1,3);
print ($result); // result is 4
?>