<?phpfunction foo($aaar){ var_dump($aaar); $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);?>
int(1) Number of arguments: 3
Second argument is: 2
Argument 0 is: 1
Argument 1 is: 2
Argument 2 is: 3
很正常啊。
?於看明白了,41的意思是 “是1"
?甚?是1,因?foo(1,2,3) 第一???是1,所以$aaar就是1.
????形?,很正常。
如果
function foo($aaar, $bbbr)
foo('a','b','c','d');
$aaar = a
$bbbr = b