http://www.php.net/manual/en/language.types.boolean.php
When converting to boolean, the following values are considered FALSE:
the boolean FALSE itself
the integer 0 (zero)
the float 0.0 (zero)
the empty string, and the string "0"
an array with zero elements
an object with zero member variables (PHP 4 only)
the special type NULL (including unset variables)
SimpleXML objects created from empty tags
为什么强转 boolean 时 "0" 被认为是 false, 既然如此, 那 "false" 怎么不认为是 false?
When converting to boolean, the following values are considered FALSE:
the boolean FALSE itself
the integer 0 (zero)
the float 0.0 (zero)
the empty string, and the string "0"
an array with zero elements
an object with zero member variables (PHP 4 only)
the special type NULL (including unset variables)
SimpleXML objects created from empty tags
为什么强转 boolean 时 "0" 被认为是 false, 既然如此, 那 "false" 怎么不认为是 false?