首页 >后端开发 >php教程 >php converting to boolean

php converting to boolean

WBOY
WBOY原创
2016-06-23 14:36:101014浏览

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).

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
上一篇:PHP echo [转]下一篇:{php 变量}