Is PHP case-sensitive?

It is very important to be aware of the fact PHP is case-sensitive. Some developers therefore tend to use this characteristic to differentiate variables by applying capital letters (for example $bank and $BANK). Something we would not recommend to do. Applying it to a small script might still add value, but imagine applying it to a large script containing thousands of lines… indeed you will easily loose track. Therefore we would recommend using small letters for variables and capital letters for constants.



Was this useful?