![]() |
VOOZH | about |
We are given a variable and the task is to check whether the value of the given variable is null or not and returns a Boolean value using PHP.
To check a variable is null or not, we use is_null() function. A variable is considered to be NULL if it does not store any value. It returns TRUE if the value of variable $var is NULL, otherwise, returns FALSE.
boolean is_null( $var )Example: This example checks whether a variable is null in PHP or not.
Output:
True
False
False