xref: /PHP-5.6/Zend/tests/closure_010.phpt (revision d5ef2f46)
1--TEST--
2Closure 010: Closure calls itself
3--FILE--
4<?php
5$i = 3;
6$lambda = function ($lambda) use (&$i) {
7    if ($i==0) return;
8    echo $i--."\n";
9    $lambda($lambda);
10};
11$lambda($lambda);
12echo "$i\n";
13?>
14--EXPECT--
153
162
171
180
19