mirror of
https://github.com/php/php-src.git
synced 2024-10-17 14:32:37 +00:00
22 lines
276 B
Plaintext
22 lines
276 B
Plaintext
|
--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)
|