xref: /PHP-8.0/Zend/tests/ns_034.phpt (revision 7aacc705)
1--TEST--
2034: Support for namespaces in compile-time constant reference
3--FILE--
4<?php
5namespace A;
6use A as B;
7class Foo {
8    const C = "ok\n";
9}
10function f1($x=Foo::C) {
11    echo $x;
12}
13function f2($x=B\Foo::C) {
14    echo $x;
15}
16function f3($x=\A\Foo::C) {
17    echo $x;
18}
19echo Foo::C;
20echo B\Foo::C;
21echo \A\Foo::C;
22f1();
23f2();
24f3();
25?>
26--EXPECT--
27ok
28ok
29ok
30ok
31ok
32ok
33