php-src/Zend/tests/halt_compiler4.phpt
Nikita Popov edf22962ef Make constant redeclaration a warning
We missed the change to make this an Error exception in PHP 8,
but at least elevate it to a warning, to avoid a notice -> exception
jump at a later time.
2020-09-21 17:04:39 +02:00

11 lines
245 B
PHP

--TEST--
__HALT_COMPILER(); bad define() of __COMPILER_HALT_OFFSET__ 2
--FILE--
<?php
define ('__COMPILER_HALT_OFFSET__', 1);
__HALT_COMPILER();
?>
==DONE==
--EXPECTF--
Warning: Constant __COMPILER_HALT_OFFSET__ already defined in %s on line %d