PHP is_null() Function
The is_null() function in PHP is used to find whether the specified variable is a null or not. It returns a Boolean value true if the parameter var is null else it returns false.
Syntax
is_null ( mixed $var )
var(required)- This parameter represents the value to check.
Return
This function returns a Boolean value TRUE if the parameter var is null, else it returns FALSE.
Example 1
Output
The var is null
Example 2
#case-sensitive
Output
The var is null
Example 3
Output
The var is not null