php 函数使用可变数量的参数

php在用户自定义函数中支持可变数量的参数列表。php 在php5.5及更早的版本中,使用func_num_args(), func_get_arg(), func_get_args()函数实现。web <?php function myfunc(){ // 获取参数数量 echo func_num_args().PHP_EOL; // 获取第一个参数的值: print_r(func_get_ar
相关文章
相关标签/搜索