您的位置:首页 > 编程语言 > PHP开发

PHP empty()

2015-08-07 13:52 531 查看
PHP 中哪些情况是空的呢

The following things are considered to be empty:

“” (an empty string)

0 (0 as an integer)

0.0 (0 as a float)

“0” (0 as a string)

NULL

FALSE

array() (an empty array)

var $var; (a variable declared, but without a value in a class)

[code]$a = 0;
if (empty($a)){
    echo "a is empty";
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: