- 从 UNSUPPORTED_FUNCTIONS 列表中移除 func_num_args - 添加 func_num_args 函数的运行时测试用例 - 实现 func_num_args 函数调用优化逻辑 - 支持通过 argInfoList 计算函数参数数量 - 添加对可变参数函数的支持pull/1/head
parent
d919ee280c
commit
898cbe2553
3 changed files with 41 additions and 1 deletions
@ -0,0 +1,29 @@ |
||||
--TEST-- |
||||
func_num_args |
||||
--FILE-- |
||||
<?php |
||||
|
||||
function foo1($a, $b, $c = 10) |
||||
{ |
||||
var_dump(func_num_args()); |
||||
} |
||||
|
||||
function foo2(...$args) { |
||||
var_dump(func_num_args()); |
||||
} |
||||
|
||||
function foo3($a, $b, $c, ...$args) { |
||||
var_dump(func_num_args()); |
||||
} |
||||
|
||||
function main() |
||||
{ |
||||
foo1(2.5, 3); |
||||
foo2(1, 3, 5, 8, 10); |
||||
foo3(1, 3, 5, 8, 10, 12); |
||||
} |
||||
?> |
||||
--EXPECT-- |
||||
int(3) |
||||
int(5) |
||||
int(6) |
||||
Loading…
Reference in new issue