I have read the documentation for the empty()
function, but I'm not sure if I understood it correctly.
Is this how the empty()
function works?:
empty()
will returntrue
if the variable doesn't exist.- If the variable exist, then
empty()
will returntrue
if the variable is equal tofalse
or if the variable is equal to0
. - If the variable exist and the variable is not equal to
false
and the variable is not equal to0
, then the variable is converted tobool
and if the result of the conversion isfalse
, thenempty()
will returntrue
, elseempty()
will returnfalse
.