Is there a difference between isset
and !empty
. If I do this double boolean check, is it correct this way or redundant? and is there a shorter way
Empty just check is the refered variable/array has an value if you check the php doc(empty) you'll see this things are considered emtpy
* "" (an empty string) * 0 (0 as an integer) * "0" (0 as a string) * NULL * FALSE * array() (an empty array) * var $var; (a variable declared, but without a value in a class)
while isset check if the variable isset and not null which can also be found in the php doc(isset)