php-src/Zend/tests/closure_010.phpt
2008-07-10 07:57:34 +00:00

19 lines
228 B
PHP

--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