xref: /PHP-8.0/Zend/tests/closure_006.phpt (revision f8d79582)
1--TEST--
2Closure 006: Nested lambdas
3--FILE--
4<?php
5
6$getClosure = function ($v) {
7    return function () use ($v) {
8        echo "Hello World: $v!\n";
9    };
10};
11
12$closure = $getClosure (2);
13$closure ();
14
15echo "Done\n";
16?>
17--EXPECT--
18Hello World: 2!
19Done
20