当前位置:Gxlcms > PHP教程 > phpconvertingtoboolean

phpconvertingtoboolean

时间:2021-07-01 10:21:17 帮助过:23人阅读

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

Every other value is considered TRUE (including any resource).

人气教程排行