2015-07-30 01:18:13 +08:00
|
|
|
--TEST--
|
|
|
|
__COMPILER_HALT_OFFSET__ is a "magic" constant, which should work if referenced directly, even in a namespace
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace {
|
2020-02-04 05:52:20 +08:00
|
|
|
echo __COMPILER_HALT_OFFSET__, "\n";
|
|
|
|
echo \__COMPILER_HALT_OFFSET__, "\n";
|
2015-07-30 01:18:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace Foo {
|
2020-02-04 05:52:20 +08:00
|
|
|
echo __COMPILER_HALT_OFFSET__, "\n";
|
|
|
|
echo \__COMPILER_HALT_OFFSET__, "\n";
|
|
|
|
echo namespace\__COMPILER_HALT_OFFSET__, "\n";
|
2015-07-30 01:18:13 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
__halt_compiler();
|
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
%d
|
|
|
|
%d
|
|
|
|
%d
|
|
|
|
%d
|
|
|
|
|
2020-05-26 20:10:57 +08:00
|
|
|
Fatal error: Uncaught Error: Undefined constant "Foo\__COMPILER_HALT_OFFSET__" in %s:%d
|
2015-07-30 01:18:13 +08:00
|
|
|
Stack trace:
|
|
|
|
#0 {main}
|
|
|
|
thrown in %s on line %d
|