php null
snippet in php

is null php

user2411

// The is_null() function checks whether a variable is NULL or not. This function returns true (1) if the variable is NULL, otherwise it returns false/nothing.

<?php
    $var = NULL;  
	if (is_null($var)) {
      	echo "yes, is null";
      
    } else {
      	echo "not null";
    }
?>
  

php check for null

user3722

is_null($foo)

php null

user1328

<?php
  
	$var = NULL;  

?>