xref: /PHP-7.3/Zend/tests/use_function/basic.phpt (revision 5dd41627)
1--TEST--
2import namespaced function
3--FILE--
4<?php
5
6namespace foo\bar {
7    function baz() {
8        return 'foo.bar.baz';
9    }
10    function qux() {
11        return baz();
12    }
13}
14
15namespace {
16    use function foo\bar\baz, foo\bar\qux;
17    var_dump(baz());
18    var_dump(qux());
19    echo "Done\n";
20}
21
22?>
23--EXPECT--
24string(11) "foo.bar.baz"
25string(11) "foo.bar.baz"
26Done
27