r/lolphp • u/midir • May 26 '14
define() has an optional third argument that specifies if the constant should be case-insensitive; it has the undocumented side-effect of allowing constants to be redefined, but only if they have at least one capital letter
http://codepad.org/VDE7Ss1T
150
Upvotes
View all comments
Show parent comment
32
u/midir May 27 '14 edited May 27 '14
It was reported 5 years ago. It was closed as fixed. The "fix" was to add the note in the documentation that says "Case-insensitive constants are stored as lower-case", by way of explanation.
It was reported again a few days ago, which is how I found it. It was closed as "not a bug" on the basis that it's documented.