xref: /PHP-8.1/Zend/tests/constants_009.phpt (revision f8d79582)
1--TEST--
2Accessing constants inside namespace
3--FILE--
4<?php
5
6namespace foo\x;
7
8const x = 2;
9
10class x {
11    const x = 1;
12}
13
14
15var_dump(namespace\x,
16x::x,
17namespace\x::x);
18var_dump(defined('foo\x\x'));
19
20?>
21--EXPECT--
22int(2)
23int(1)
24int(1)
25bool(true)
26