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 That deserves a RFC
=> More informations about this toot | More toots from galvao@phpc.social
@galvao Indeed, you're right.
I would start with a legacy check: in particular, multiple inclusion of the same would be now a Fatal error.
And with autoload, it might be a tiny fraction of codes.
=> More informations about this toot | More toots from dseguy@phpc.social
@dseguy Do you have karma to do it?
=> More informations about this toot | More toots from galvao@phpc.social
@galvao I can check (a lot) of code, and write the RFC. Most of the value would be here.
Then, find someone else to do it :) .
=> More informations about this toot | More toots from dseguy@phpc.social This content has been proxied by September (ba2dc).Proxy Information
text/gemini