PHP function call_user_func()

Availability in PHP 4.0

Call a user function given by the first parameter

Parameters

Parameter Data type Default value Note
$function callback not The function to be called. Class methods may also be invoked statically using this function by passing array($classname, $methodname) to this parameter. Additionally class methods of an object instance may be called by passing array($objectinstance, $methodname) to this parameter.
$parameter mixed null, Zero or more parameters to be passed to the function.
$_ mixed null

Return values

mixed

the function result, or false on error.

Other resources

Official documentation for call-user-func

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.