summaryrefslogtreecommitdiff
path: root/Zend/tests/use_const/define_imported.phpt
blob: 5eb44be64a0585ce64e5da0f388bc1637699aec1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--TEST--
defining const with same name as imported should fail
--FILE--
<?php

namespace {
    use const foo\bar;

    const bar = 42;
}

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