dis-bench / src /php /php-src /Zend /tests /closures /closure_011.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
247 Bytes
--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