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
相關文章
相關標籤/搜索