A #PHP global constant redefinition is a simple warning.
A #PHP class constant redefinition is a full Fatal Error.
I am so used to the Fatal error, that I expected the global constant to behave the same. Shouldn't they?
[#]phptip #phptrick
https://php-tips.readthedocs.io/en/latest/tips/constant_redefinition.html
=> More informations about this toot | More toots from dseguy@phpc.social
@dseguy Fanatical dedication to backwards compatibility, innit? I susect there was concern over breaking WP or something.
=> More informations about this toot | More toots from pollita@phpc.social
@pollita @dseguy it used to be a notice in PHP 7 and was elevated to a warning in 8.
I'm sure we will just have another round of elevating warnings to errors in PHP 9.
=> More informations about this toot | More toots from Girgias@phpc.social
text/gemini
This content has been proxied by September (ba2dc).