- 在 ClosureGenerator 中实现 & 捕获当前函数所有局部变量作为 arguments 处理 - 将原始上下文的局部变量赋值给 context 的 arguments 属性 - 添加静态变量测试用例验证 C++ lambda 捕获功能pull/1/head
parent
f226382d52
commit
5260559345
2 changed files with 19 additions and 0 deletions
@ -0,0 +1,16 @@ |
|||||||
|
--TEST-- |
||||||
|
static variables |
||||||
|
--FILE-- |
||||||
|
<?php |
||||||
|
|
||||||
|
function main() { |
||||||
|
$c = 100; |
||||||
|
static $arr3 = array($c => 'ten'); |
||||||
|
print_r($arr3); |
||||||
|
} |
||||||
|
?> |
||||||
|
--EXPECT-- |
||||||
|
Array |
||||||
|
( |
||||||
|
[100] => ten |
||||||
|
) |
||||||
Loading…
Reference in new issue