YAOMK wrote:I believe AND is more readable than "and".
Before you even raised this style issue, I actually arbitrarily used AND and OR in my own coding style, but it just occurred to me that such uppercase keywords are inconsistent with the lowercase keywords if and else. If indeed you regard AND as more readable than and, then you should also regard IF as more readable than if. Where style is concerned, consistency is important.
YAOMK wrote:Same thing with constants, CONSTANT_A is better practice than constant_b.
That helps the constant names stand out from the keywords, but if you use uppercase keywords, then the constant names no longer stand out. I believe that it is also a relic from C, where constants were traditionally defined as preprocessor macros, which like defined constants in PHP, do not obey scope - without an all caps naming convention, there is a serious risk of confusion between variable/function names and macro names. In PHP this argument no longer applies since variable names are prefixed with '$', and since names are case insensitive collision with function names is still possible regardless of a case-based naming convention.