+ 1

What's the difference between empty() and isSet() in PHP?

1st May 2018, 5:24 PM
Marien Mupenda
Marien Mupenda - avatar
2 Answers
+ 2
IIRC empty() checks if the value is empty or "". isset() checks if a variable exists or is NULL.
1st May 2018, 11:24 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
0
if your say that empty () checks whether a variable is empty, does you mean that $x = 0 is an empty variable? because will return TRUE if checked
2nd May 2018, 4:43 PM
Marien Mupenda
Marien Mupenda - avatar