(PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8)
is_null — Indica si una variable es null
null
$value
Indica si la variable dada es null.
value
La variable a evaluar.
Devuelve true si value es null, false en caso contrario.
true
false
Ejemplo #1 Ejemplo con is_null()
<?phperror_reporting(E_ALL);$foo = NULL;var_dump(is_null($inexistent), is_null($foo));?>