(PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8)
is_null — Finds whether a variable is null
null
$value
Finds whether the given variable is null.
value
The variable being evaluated.
Returns true if value is null, false otherwise.
true
false
Example #1 is_null() example
<?phperror_reporting(E_ALL);$foo = NULL;var_dump(is_null($inexistent), is_null($foo));?>
Notice: Undefined variable: inexistent in ... bool(true) bool(true)