summaryrefslogtreecommitdiff
path: root/Zend/tests/return_types/022.phpt
blob: b0686ea8ab416efef9b801976d99dd5818686bbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--TEST--
Hint on closure with lexical vars
--FILE--
<?php
$foo = "bar";
$test = function() use($foo) : Closure {
    return function() use ($foo) {
        return $foo;
    };
};

$callable = $test();
var_dump($callable());
--EXPECT--
string(3) "bar"