summaryrefslogtreecommitdiff
path: root/Zend/tests/closure_011.phpt
blob: 707136463d6866f1b545bede1252bc52c704bef1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--TEST--
Closure 011: Lexical copies not static in closure
--FILE--
<?php
$i = 1;
$lambda = function () use ($i) {
    return ++$i;
};
$lambda();
echo $lambda()."\n";
//early prototypes gave 3 here because $i was static in $lambda
?>
--EXPECT--
2