I ran into a problem when php handles "0" differently.
I run the following script on two different machines:
$a = "0"; if ($a) { echo("helo"); }
1) Local machine -> PHP 5.2.17 -> it treated "0" as valid and printed "helo"
2) Server -> PHP 5.3.6 -> it treated "0" as empty / false and does not print "helo"
Is this related to php configuration (if yes, what configuration) or php version?
source share