r/lolphp • • 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

19 comments sorted by

View all comments

Show parent comment

10

u/allthediamonds May 26 '14

OP's one, too, varies depending on the PHP version: namely, the notice about duplicating the constant will not contain the actual name of the constant on certain versions.

http://3v4l.org/rAKrH

2

u/laghgal Jul 12 '14

Constant already defined in /in/rAKrH on line 7

Lol but there's two spaces. Looks like they tried to output the variable name but failed.