xref: /PHP-8.0/Zend/tests/use_function/alias.phpt (revision 5dd41627)
1--TEST--
2aliasing imported functions to resolve naming conflicts
3--FILE--
4<?php
5
6namespace foo {
7    function baz() {
8        return 'foo.baz';
9    }
10}
11
12namespace bar {
13    function baz() {
14        return 'bar.baz';
15    }
16}
17
18namespace {
19    use function foo\baz as foo_baz,
20                 bar\baz as bar_baz;
21    var_dump(foo_baz());
22    var_dump(bar_baz());
23    echo "Done\n";
24}
25
26?>
27--EXPECT--
28string(7) "foo.baz"
29string(7) "bar.baz"
30Done
31