xref: /PHP-7.0/Zend/tests/closure_035.phpt (revision fa762634)
1--TEST--
2Testing 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
14var_dump($x());
15
16?>
17--EXPECTF--
18object(Closure)#%d (1) {
19  ["static"]=>
20  array(1) {
21    ["x"]=>
22    *RECURSION*
23  }
24}
25int(1)
26