Now, lets deiscuss what each the three functions demonstrated in prvious code example do :
1) func_num_args function
This function returns the total number of arguments passed to a user defined function.
2) func_get_args function
This functions returns all the arguments passed to a user defined function in an array.
3) func_get_arg function
This function takes a single argument which specifies the position of argument to return which was passed to the current user defined function. Function argument position is specified starting from 0. It returns the specified argument when successful or FALSE on error.
|