call_user_func
call_user_func
call_user_func
It Call a user function that given by the first parameter
This is one of the method for calling a user-defined function.
Syntax:
mixed call_user_func ( string function_name [, mixed parameter [, mixed …]])
It Call a user defined function given by the function_name in the first parameter.
Example:
function test(int x)
{
}
function test(int x,int y)
{
}
The above function can be called as
test(2);
test(3,4);
By using the call_user_func We call the above function as
call_user_func (’test’, 2);
call_user_func (’test’, 3,4);
here, both are calling the function test().
