Let's take a look at the differences between the three functions of PHP [unc_get_arg (), func_get_args (), func_num_args ()]. Let's take a look at the following instance code.
Let's take a look at the differences between the three functions of PHP [unc_get_arg (), func_get_args (), func_num_args ()]. Let's take a look at the following instance code.
The Code is as follows:
Function jb51 (){
Print_r (func_get_args ());
Echo"
";
Echo func_get_arg (1 );
Echo"
";
Echo func_num_args ();
}
Jb51 ("www", "jb51", "net ");
?>
Output result:
Array ([0] => blog [1] => micxp [2] => com)
Micxp
3
From the above results, we can see that
Func_get_args () This function returns an array containing all the parameters of the current function.
The func_get_arg () function returns the value of the parameter at the specified position.
Func_num_args () This function returns the number of parameters returned by the current function
,