xref: /PHP-8.3/Zend/tests/use_const/alias.phpt (revision 4adf49ee)
1--TEST--
2aliasing imported constants to resolve naming conflicts
3--FILE--
4<?php
5
6namespace foo {
7    const baz = 42;
8}
9
10namespace bar {
11    const baz = 43;
12}
13
14namespace {
15    use const foo\baz as foo_baz,
16              bar\baz as bar_baz;
17    var_dump(foo_baz);
18    var_dump(bar_baz);
19    echo "Done\n";
20}
21
22?>
23--EXPECT--
24int(42)
25int(43)
26Done
27