Re: [Strawpoll] Promoting redefining constant to exception

From: Date: Tue, 25 Jan 2022 20:08:01 +0000
Subject: Re: [Strawpoll] Promoting redefining constant to exception
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-116921@lists.php.net to get a copy of this message
A constant is a value that, unlike a variable, cannot be reassociated with a different value. A properly written software should never redefine constants. The possibility of redefining constants in PHP should be considered a bug rather than a feature. Constants are not good for configuration values that can be changed. A proper data structure should be used instead. Constants should never have to be redefined, either by the software itself, its tests or its extensions. Constant values must remain the same under all circumstances otherwise they are no longer constants. +1 to remove it in PHP 9.0

« previous php.internals (#116921) next »