As per the php.net site documentation, is_null() function finds whether provided variable is NULL.
Actually, is_null() function works similar like isset() but as its opposite. So it returns TRUE in all the cases except when there is no value assigned to a variable OR assigned as NULL.
Top comments (1)
A useful addition is
empty()
which basically can be treated asisset
(since it covers it) but for moments where you explictly don't seek to know whether the actual value is set.empty()
also works on object members, whilstisset()
does not.