Home > Article > Backend Development > php data type NULL
The special NULL value indicates that a variable has no value. The only possible value of type NULL is NULL.
A variable is considered NULL if:
is assigned a value of NULL.
has not been assigned a value yet.
is unset().
Syntax
The NULL type has only one value, which is the case-insensitive constant NULL.
<?php $var = NULL; ?>
See is_null() and unset().
Convert to NULL
Using (unset) $var Converting a variable to null will not delete the variable or unset its value. Just returns NULL value.