1--TEST--
2Class constants can be used as a class name
3--FILE--
4<?php
5
6class Test {
7    const NAME = 'Test2';
8}
9
10class Test2 {
11    const FOO = 42;
12    public static $foo = 42;
13
14    public static function foo() {
15        return 42;
16    }
17}
18
19var_dump(Test::NAME::FOO);
20var_dump(Test::NAME::$foo);
21var_dump(Test::NAME::foo());
22
23?>
24--EXPECT--
25int(42)
26int(42)
27int(42)
28