(PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8)
is_null — Indique si une variable vaut null
null
$value
Indique si la variable donnée vaut null.
value
La variable à évaluer.
Retourne true si value est null, false sinon.
true
false
Exemple #1 Exemple avec is_null()
<?php error_reporting(E_ALL); $foo = NULL; var_dump(is_null($inexistent), is_null($foo)); ?>