The difference between phpis_null, empty, and isset is clarified in one table. is_nullisset. One table is used to identify the differences between phpis_null, empty, and isset, is_nullissetisset determines whether the variable already exists empty determines whether the variable is NULL or 0is_null determines whether the variable is NULL. a table lists the differences between php is_null, empty, and isset. is_nullisset
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 |
Empty |
Is_null |
Isset |
| $ A = "" |
True |
False |
True |
| $ A = null |
True |
True |
False |
| Var $ |
True |
True |
False |
| $ A = array () |
True |
False |
True |
| $ A = false |
True |
False |
True |
| $ A = 15 |
False |
False |
True |
| $ A = 1 |
False |
False |
True |
| $ A = 0 |
True |
False |
True |
| $ A = "0" |
True |
False |
True |
| $ A = "true" |
False |
False |
True |
| $ A = "false" |
False |
False |
True |
Is_null, empty, and isset are different. is_nullisset isset determines whether the variable already exists empty and whether the variable is NULL or 0 is_null. Whether the variable is NULL...