php-src/Zend/tests/constants_004.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

14 lines
192 B
PHP

--TEST--
Trying to redeclare constant inside namespace
--FILE--
<?php
namespace foo;
const foo = 1;
const foo = 2;
?>
--EXPECTF--
Warning: Constant foo\foo already defined in %s on line %d