func_num_args
func_num_args
func_num_args
It returns the number of arguments passed to the function.
Syntax:
int func_num_args ( )
It returns the number of arguments passed into the current user-defined function. func_num_args() will generate a warning if called from outside of a user-defined function.
Example:
function test() {
$no = func_num_args();
return $no;
}
echo $noarg = test (1, 2); // here, the output is 2.
echo $noarg = test(”abc”,”xyz”,”def”); // here, the output is 3.
