As I know we can't redefine a constant in PHP. So if I do:
define("DEVELOPMENT", true);
theoretical I can not redefine it using:
define("DEVELOPMENT", false); (or) const DEVELOPMENT = false;
The problem is PHP let me do that. It lets me redefining a constant without throwing any error. Display error is on (I got any other error):
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL & ~E_WARNING & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
What to do so constants can't be redefined and to get error if I try?
My PHP version is 7.2.17