PHP获取函数参数数组
<?php
function foo() {
$args = func_get_args();
var_export($args);
}
foo('First arg', 'Second arg');
输出
array (
0 => 'First arg',
1 => 'Second arg',
)
?>
<?php
function foo() {
$args = func_get_args();
var_export($args);
}
foo('First arg', 'Second arg');
输出
array (
0 => 'First arg',
1 => 'Second arg',
)
?>