Annotation of embedaddon/php/Zend/tests/closure_035.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Testing recursion detection with Closures
! 3: --FILE--
! 4: <?php
! 5:
! 6: $x = function () use (&$x) {
! 7: $h = function () use ($x) {
! 8: var_dump($x);
! 9: return 1;
! 10: };
! 11: return $h();
! 12: };
! 13:
! 14: var_dump($x());
! 15:
! 16: ?>
! 17: --EXPECTF--
! 18: object(Closure)#%d (1) {
! 19: ["static"]=>
! 20: array(1) {
! 21: ["x"]=>
! 22: *RECURSION*
! 23: }
! 24: }
! 25: int(1)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>