php-src/Zend/tests/closure_006.phpt
2008-07-14 09:49:03 +00:00

20 lines
243 B
PHP

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