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 (4) { 19 ["name"]=> 20 string(%d) "{closure:%s:%d}" 21 ["file"]=> 22 string(%d) "%s" 23 ["line"]=> 24 int(%d) 25 ["static"]=> 26 array(1) { 27 ["x"]=> 28 *RECURSION* 29 } 30} 31int(1) 32