1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
--TEST-- Using namespace constants and constants of global scope --FILE-- <?php namespace foo; const foo = 1; define('foo', 2); var_dump(foo, namespace\foo, \foo\foo, \foo, constant('foo'), constant('foo\foo')); ?> --EXPECT-- int(1) int(1) int(1) int(2) int(2) int(1)