diff options
Diffstat (limited to 'Zend/tests/closure_035.phpt')
-rw-r--r-- | Zend/tests/closure_035.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Zend/tests/closure_035.phpt b/Zend/tests/closure_035.phpt new file mode 100644 index 0000000..e39a991 --- /dev/null +++ b/Zend/tests/closure_035.phpt @@ -0,0 +1,25 @@ +--TEST-- +Testing recursion detection with Closures +--FILE-- +<?php + +$x = function () use (&$x) { + $h = function () use ($x) { + var_dump($x); + return 1; + }; + return $h(); +}; + +var_dump($x()); + +?> +--EXPECTF-- +object(Closure)#%d (1) { + ["static"]=> + array(1) { + ["x"]=> + *RECURSION* + } +} +int(1) |