News for hackers. Stuff that matters.
Re:Signs of Crappy PHP Software by nir on Sunday July 04, 2010 @12:01PM (#1485847)
On the other hand, when someone reads "echo LOOK_AHEAD" they immediately know it's a constant and thus (a) global and (b)(more importantly) defined once and never modified by the code.

With "echo $look_ahead" there's no indication of that, and in the future another dev might add something that modifies $look_ahead's value and break other parts of the code, making for sneaky bug (which incidentally is why non-constant globals are so disliked ;))

There are no comments on this comment yet.