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 Yes, I suspect backward compatibility.
Now, I'd like to run some SCA check to spot such problems, and see how it can be fixed (automatically? manually?).
That way, it might help everyone.
=> More informations about this toot | More toots from dseguy@phpc.social
text/gemini
This content has been proxied by September (ba2dc).