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
isset
!empty
$a = 0; if (isset($a)) { //$a is set because it has some value ,eg:0 echo '$a has value'; } if (!empty($a)) { //$a is empty because it has value 0 echo '$a is not empty'; } else { echo '$a is empty'; }