Re: [RFC] Throw Exception on Attempt of Constant Redefinition

From: Date: Mon, 20 Jun 2016 20:42:43 +0000
Subject: Re: [RFC] Throw Exception on Attempt of Constant Redefinition
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-94162@lists.php.net to get a copy of this message
The RFC was updated to propose this change only for PHP 8.0, and thereby, vote is delayed for uncertain time. I think, changing "Notice: Constant %s already defined" into "Deprecated: ...." in 7.1 doesn't make a lot of sense. Thanks. Dmitry. ________________________________ From: Pierre Joye <pierre.php@gmail.com> Sent: Friday, June 17, 2016 9:31:33 AM To: Dmitry Stogov Cc: PHP internals; Stas Malyshev Subject: Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition On Jun 17, 2016 1:10 PM, "Dmitry Stogov" <dmitry@zend.com<mailto:dmitry@zend.com>> wrote: > > Got it :( > Then this may be a serious BC break, and it's better to depricate it in 7..1 and throw > exception only in 8. Fully agree. Thanks :) > Thanks. Dmitry. > > > > On Thu, Jun 16, 2016 at 8:14 PM +0300, "Stanislav Malyshev" > <smalyshev@gmail.com<mailto:smalyshev@gmail.com><mailto:smalyshev@gmail.com<mailto:smalyshev@gmail.com>>> > wrote: > > Hi! > > > Please review: > > https://wiki.php.net/rfc/constant_redefinition > > I would propose to not throw an error if constant is redefined to > exactly the same value. Some of the code might be doing this > unknowingly, e.g. by writing include instead of include_once, and > there's no real reason to break it. > > -- > Stas Malyshev > smalyshev@gmail.com<mailto:smalyshev@gmail.com>

« previous php.internals (#94162) next »