summaryrefslogtreecommitdiff
path: root/Zend/tests/ns_034.phpt
blob: 76775f1180df5decf2ab1fe71a2d4aa469d2d7bc (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
26
27
28
29
30
31
--TEST--
034: Support for namespaces in compile-time constant reference
--FILE--
<?php
namespace A;
use A as B;
class Foo {
	const C = "ok\n";
}
function f1($x=Foo::C) {
	echo $x;
}
function f2($x=B\Foo::C) {
	echo $x;
}
function f3($x=\A\Foo::C) {
	echo $x;
}
echo Foo::C;
echo B\Foo::C;
echo \A\Foo::C;
f1();
f2();
f3();
--EXPECT--
ok
ok
ok
ok
ok
ok