When I was learning PHP, I read somewhere that you should always use the upper case versions of booleans, TRUE
and FALSE
, because the "normal" lowercase versions, true
and false
, weren't "safe" to use.
It's now been many years, and every PHP script I've written uses the uppercase version. Now, though, I am questioning that, as I have seen plenty of PHP written with the lowercase version (i.e. Zend Framework).
Is/Was there ever a reason to use the uppercase version, or is it perfectly OK to use the lowercase?
edit: Forgot to mention that this applies to NULL
and null
as well.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…