dis-bench / src /php /php-src /Zend /tests /closures /closure_010.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
228 Bytes
--TEST--
Closure 010: Closure calls itself
--FILE--
<?php
$i = 3;
$lambda = function ($lambda) use (&$i) {
if ($i==0) return;
echo $i--."\n";
$lambda($lambda);
};
$lambda($lambda);
echo "$i\n";
?>
--EXPECT--
3
2
1
0