summaryrefslogtreecommitdiff
path: root/Zend/tests/use_const/shadow_global.phpt
blob: 930cc9f0b87788a4a0bc24d4f4131cc4da786dfc (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--
shadowing a global constant with a local version
--FILE--
<?php

namespace {
    require 'includes/global_bar.php';
    require 'includes/foo_bar.php';
}

namespace {
    var_dump(bar);
}

namespace {
    use const foo\bar;
    var_dump(bar);
    echo "Done\n";
}

?>
--EXPECT--
string(10) "global bar"
string(9) "local bar"
Done