mirror of
https://github.com/php/php-src.git
synced 2024-10-17 06:22:53 +00:00
19 lines
228 B
Plaintext
19 lines
228 B
Plaintext
|
--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
|