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

namespace {
    const bar = 42;

    use const foo\bar;
}

namespace {
    echo "Done";
}

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