?php function foo() {$numargs = func_num_args(); echo "Number of arguments: $numargs br \n"; if ($numargs = 2) {echo "Second argument is: ". func_get_arg (1)." br \n";} $arg_list = func_get_args(); for ($i = 0; $i $numargs; $i++) {echo "Argument $i is: ". $arg_list[$i]." br \n";}} foo (1, 2, 3);?
?php function foo() {$numargs = func_num_args(); echo "Nombre d'arguments: $numargs br \n"; if ($numargs = 2) {echo "Le second argument est: ". func_get_arg (1)." br \n";} $arg_list = func_get_args(); for ($i = 0; $i $numargs; $i++) {echo "L'argument $i est: ". $arg_list[$i]." br \n";}} foo(1, 2, 3);?