PHP获取函数参数数组

<?php
function foo() {
  $args = func_get_args();
  var_export($args);
}
foo('First arg', 'Second arg');
输出
array (
  0 => 'First arg',
  1 => 'Second arg',
)
?>
原文地址:https://www.cnblogs.com/phpfans/p/2192960.html