F.14. Function Handling
Function | Returns | Description |
---|---|---|
call_user_func(string function_name [, mixed parmeter] [, mixed ...]) | mixed | Calls a user function that is the first parameter. |
call_user_func_array(string function_name, array parameters) | mixed | Calls a user function that is the first parameter with the arguments contained in array. |
call_user_method(string method_name, mixed object [, mixed parameter] [, mixed ...]) | mixed | Calls a user method on a specific object or class. |
call_user_method_array(string method_name, mixed object, array params) | mixed | Calls a user method on a specific object or class using a parameter array. |
register_shutdown_function(string function_name) | void | Registers a user-level function to be called on request termination. |
register_tick_function(string function_name [, mixed arg [, mixed ... ]]) | bool | Registers a tick callback function. |
unregister_tick_function(string function_name) | void | Unregisters a tick callback function. |
create_function(string args, string code) | string | Creates an anonymous function, and returns its name |
function_exists(string function_name) | bool | Checks if the function exists. |
func_num_args(void) | int | Gets the number of arguments that were passed to the function. |
func_get_arg(int arg_num) | mixed | Gets the $arg_num'th argument that was passed to the function. |
func_get_args() | array | Gets an array of the arguments that were passed to the function. |
Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP 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.