* Function processing function
* 1. Parameter acquisition: it must be called in a function to be meaningful
* 1.get_num_args(void): Return the number of parameters
* 2.get_get_args(): Returns the parameter value index array
* 3.get_get_arg(int): Returns the parameter value of the specified index
function demo1($a,$b,$c) { //返回实际参数组成的索引数组 // return func_get_args();//无参数,[0]=>php,[1]=>java,[2]=>c // return func_get_arg(1); //参数为实参索引,获取第2个参数值:java return func_num_args();//无参数,返回参数数量:3 } print_r(demo1('php','java','c'));
The above is the detailed content of Function processing function in php. For more information, please follow other related articles on the PHP Chinese website!