时间:2021-07-01 10:21:17 帮助过:18人阅读
function hello($param1,$param2,...){
echo 'function name is:'. __FUNCTION__; // get function itself name
// how to get how many parameters in these function ,
echo '
has ? parameters';
}
hello();
function hello(){
echo 'function name is:'. __FUNCTION__; // get function itself name
// how to get how many parameters in these function ,
echo '
has '.func_num_args().' parameters
';
$params = func_get_args();
foreach($params as $param){
echo $param.'
';
}
}
hello(1,2,3);