how check if null in php code example Example 1: php null <?php $var = NULL; ?> Example 2: is null php is_null($var)