时时商务社区
标题:
PHP中func_get_args(),func_get_arg(),func_num_args()的区别
[打印本页]
作者:
阿情
时间:
2018-2-14 08:11
[U]复制代码[/U] 代码如下:
输出结果:
Array ( [0] => blog [1] => micxp [2] => com )
micxp
3
从上面的结果中我们就可以看出
func_get_args() 这个函数返回的是包含当前函数所有参数的一个数组
func_get_arg() 函数返回的是指定位置的参数的值
func_num_args() 这个函数返回的是当前函数的参数数量 返回的是数字
您可能感兴趣的文章:
PHP利用func_get_args和func_num_args函数实现函数重载实例
php中ob_flush函数和flush函数用法分析
php检查日期函数checkdate用法实例
php内嵌函数用法实例
php中get_defined_constants函数用法实例分析
php正则preg_replace_callback函数用法实例
PHP获取文件夹大小函数用法实例
PHP中set error handler函数用法小结
PHP函数func_num_args用法实例分析
欢迎光临 时时商务社区 (http://bbs.4435.cn/)
Powered by Discuz! X3.2