I have not suggested to *change* the case sensivity of constants, but
rather to settle on a common case â since `const` constants are always
case-sensitive, it appears that this should be so for define'd
constants. This would make code as the following to work as expected:
echo FOO; // => bar - WFT?
And it obviously would fix a bug. IMHO, that is sufficient gain for a
presumably moderate BC break.
Please note, that I do not want to pursue a discussion regarding
changing all constants to be case-sensitive or all functions and class
names to be case-insensitive. Of course, it is fine to discuss it, but
it is clearly out of scope for what I'm trying to improve (in my
opinion) here, which is more in the "a bird in the hand is worth two in
the bush" corner.
If it will be decided that all constant identifiers should be
case-insensitive, I'd be fine with it (not happy, though). Probably, I
should reword the RFC to reflect that it is actually about deprecation
and removal of the third parameter of define() (plus preventing any
extension to register constants which do not conform to the "default"
casing). In short: don't have two kinds of constants wrt. spelling
(true, false, null are not covered, since they are special anyway and
could be promoted to keywords).
Christoph M. Becker