(PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8)
is_null —
检测变量是否是 null
value
需要检测的变量。
如果 value
是 null,返回 true
,否则返回 false
。
Example #1 is_null() 示例
<?php
error_reporting(E_ALL);
$foo = NULL;
var_dump(is_null($inexistent), is_null($foo));
?>
Notice: Undefined variable: inexistent in ... bool(true) bool(true)
null
类型