1. Call_?user_?func_?array
Call a user-defined function, the first argument is the function name,
The second argument is that the argument to the function must be an indexed array
function Foobar ($arg, $arg 2) { echo __function__, "Got $arg and $arg 2\n";} class Foo { function bar ($arg, $arg 2) { echo __method__, "Got $arg and $arg 2\n"; }} The normal function calls Call_user_func_array ("Foobar", Array ("One", "one"), and/or class member function call $foo = new Foo;call_user_func_array (Array ($foo , "Bar"), Array ("Three", "four"));
2. Call_?user_?func
Calling function arguments cannot pass reference parameters
Call_user_func (function name, parameter 1, parameter 2 ...)
Call_user_func (function ($arg) {print "[$arg]\n";}, ' Test ');
3. Create_?function
Create an anonymous function
$myfunc = create_?function (' function parameter ', ' function body ');
$myfunc (function parameters);
$newfunc = Create_function (' $a, $b ', ' return ' ln ($a) + ln ($b) = ". Log ($a * $b); echo "New anonymous function: $newfunc \ n"; Echo $newfunc (2, M_e). "\ n";
4. Forward_?static_?call_?array
Call a static function in the same way as Call_user_func_array
5. Forward_?static_?call
Call a static function in the same way as Call_user_func
6. Func_?get_?arg (Index)
Returns an item parameter of the parameter list as an indexed value
7. Func_?get_?args
Collect all parameters in an array form
8. Func_?num_?args ()
Returns the number of function pass parameters
9. function_?exists
Detects if a function exists
Function_?exists ("function name"); Detects if a function exists
Ten. Get_?defined_?functions
Returns all defined functions as a two-dimensional array
Include system functions (internal)
and user-defined functions (users)
Array ( [internal] = = Array ( [0] = Zend_version [1] = Func_num_args [2] = = func_get_ Arg [3] = Func_get_args [4] = Strlen [5] = strcmp [6] = strncmp ... [+] = Bcscale [751] = Bccomp ) [user] = Array ( [0] = myrow ))
Register_?shutdown_?function.
Functions registered by the function when the system executes more than the maximum time fatal error
The registered function is still executed
function Add () { code here ...} register_?shutdown_?function ("Add");