call_user_func

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().

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.