Evaluation of variables to True or False in PHP
Variables other than Boolean type can be evaluated to truth or false in PHP.
Strings of non-zero length are evaluated to True.
Non-zero integers are evaluated to True, zero integers are evaluated to False. This principle applies to whole numbers as well as numbers with floating point.
null is evaluated to False.
Comments
Post a Comment