func_num_args
Description
The func_num_args of Function Handling for PHP returns the number of arguments passed to the function.
Syntax
func_num_args(): int
Return
Returns the number of arguments passed into the current user-defined function.
Examples
1
<? function myfunction() { $return = func_num_args(); echo "$return\n"; } myfunction("a", "b", "c"); myfunction("d", "e", "f", "g"); myfunction("h", "i"); ?>
3 4 2