summaryrefslogtreecommitdiff
path: root/Zend/tests/use_function/define_imported_before.phpt
blob: 91974e0783d15592d782523ce606bae3b2bb99d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
using function with same name as defined should fail
--FILE--
<?php

namespace {
    function bar() {}

    use function foo\bar;
}

namespace {
    echo "Done";
}

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