本文主要是介绍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()的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!