In PHP, the “truth” of any value is determined by the following rules: a value is considered “true” if it is a non-zero number or a non-empty string. Any other matters, such as an empty string or zero value, are considered false. Additionally, an array is considered accurate if it contains at least one element and false if it is open. Null is also regarded as wrong.
Leave a Reply