0
点赞
收藏
分享

微信扫一扫

PHP empty()

杰克逊爱学习 2022-10-09 阅读 94


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 条评论