This article mainly introduces the differences between phpis_null, empty, and isset in a table. isset determines whether a variable already exists and empty determines whether the variable is null or 0, is_null is required to determine whether the variable is NULL.
This article mainly introduces the differences between php is_null, empty, and isset. isset determines whether a variable already exists and empty determines whether the variable is null or 0, is_null is required to determine whether the variable is NULL.
Isset determines whether a variable already exists
Empty determines whether the variable is null or 0
Is_null determines whether the variable is NULL
Variable emptyis_nullisset
$ A = "truefalsetrue
$ A = nulltruetruefalse
Var $ atruetruefalse
$ A = array () truefalsetrue
$ A = falsetruefalsetrue
$ A = 15 falsefalsetrue
$ A = 1 falsefalsetrue
$ A = 0 truefalsetrue
$ A = "0" truefalsetrue
$ A = "true" falsefalsetrue
$ A = "false" falsefalsetrue
,