1
0
mirror of https://github.com/php/php-src.git synced 2026-04-05 15:12:39 +02:00
Files
archived-php-src/Zend/tests/closure_011.phpt
2008-07-14 09:49:03 +00:00

15 lines
247 B
PHP

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