Home > Article > Backend Development > PHP - the difference between isset and empty
转载请注明出处:http://blog.csdn.net/l1028386804/article/details/48595811
isset (variable) determines whether the variable exists, or whether the variable is null. If it exists, it is true, otherwise it is false.
empty (variable): Determine whether the content of the variable is empty (not null, but no content). Basically, it is some regulations. The following data are all "empty": 0, "", "0", false, null, array() empty array is also empty,
If the content of a variable is empty, the empty() result returns true, otherwise it returns false
The above has introduced the difference between isset and empty in PHP, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.