summaryrefslogtreecommitdiff
path: root/Zend/tests/use_function/conflicting_use.phpt
blob: 0221fbdebb38a1d579740a2524a41849d0ee7d00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
use function statements with conflicting names
--FILE--
<?php

namespace foo {
    function baz() {
        return 'foo.baz';
    }
}

namespace bar {
    function baz() {
        return 'bar.baz';
    }
}

namespace {
    use function foo\baz, bar\baz;
    echo "Done\n";
}

?>
--EXPECTF--
Fatal error: Cannot use function bar\baz as baz because the name is already in use in %s on line %d