TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

32 lines
532 B

--TEST--
Namespaced PHP_INT_MAX shadows the global constant in unqualified fetches
--FILE--
<?php
namespace N {
const PHP_INT_MAX = 5;
function shadowed(): int
{
return PHP_INT_MAX + 1;
}
function globalValue(): float
{
return \PHP_INT_MAX + 1;
}
}
namespace {
function main(): void
{
var_dump(\N\shadowed());
var_dump(\N\globalValue());
var_dump(PHP_INT_MAX + 1);
}
}
?>
--EXPECT--
int(6)
float(9.223372036854776E+18)
float(9.223372036854776E+18)