PHP empty()

来源:互联网 发布:爱奇艺出品的网络剧 编辑:程序博客网 时间:2024/06/07 10:00

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)

$a = 0;if (empty($a)){    echo "a is empty";}
0 0
原创粉丝点击