PHP empty()
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP empty()相关的知识,希望对你有一定的参考价值。
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";
以上是关于PHP empty()的主要内容,如果未能解决你的问题,请参考以下文章