PHP获取函数参数数组

<?php
function foo() {
  $args = func_get_args();
  var_export($args);
}
foo('First arg', 'Second arg');
输出
array (
  0 => 'First arg',
  1 => 'Second arg',
)
?>
posted @ 2011-09-27 11:41  科学家会武术  阅读(425)  评论(0编辑  收藏  举报