xref: /PHP-7.4/Zend/tests/ns_042.phpt (revision 7126de49)
1--TEST--
2042: Import in namespace and constants
3--FILE--
4<?php
5namespace test\ns1;
6
7const FOO = "ok\n";
8
9use test\ns1 as ns2;
10use test as ns3;
11
12echo FOO;
13echo \test\ns1\FOO;
14echo \test\ns1\FOO;
15echo ns2\FOO;
16echo ns3\ns1\FOO;
17--EXPECT--
18ok
19ok
20ok
21ok
22ok
23