dis-bench / src /php /php-src /Zend /tests /closures /closure_006.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
255 Bytes
--TEST--
Closure 006: Nested lambdas
--FILE--
<?php
$getClosure = function ($v) {
return function () use ($v) {
echo "Hello World: $v!\n";
};
};
$closure = $getClosure (2);
$closure ();
echo "Done\n";
?>
--EXPECT--
Hello World: 2!
Done