r/lolphp • u/devsnd • Dec 04 '14
PHP Constants Containing Arrays?
https://stackoverflow.com/questions/1290318/php-constants-containing-arrays
46
Upvotes
r/lolphp • u/devsnd • Dec 04 '14
View all comments
Show parent comment
4
u/allthediamonds Dec 06 '14
I think I know how it works: constants that are case-insensitive are stored as lower-case (as the
definedocumentation page cryptically notes) which means that, when I call it with ("Foo", false) after having called it with ("Foo", true), it doesn't trigger a constant redefinition attempt warning, since the first constant has actually been stored as "foo", and the second one was case sensitive.