instead of evaluating whether a variable is set, and then evaluating its contents, like this
if (isset($var)) {
if ($var == 3) {
echo($var);
}
}
is it considered bad form to do this
if ( (isset($var)) && ($var==3) ) {
echo($var);
}
since it's obvious what's going on and this should never fail (since PHP stops evaluating the conditional if isset() returns false?
if (isset($var)) {
if ($var == 3) {
echo($var);
}
}
is it considered bad form to do this
if ( (isset($var)) && ($var==3) ) {
echo($var);
}
since it's obvious what's going on and this should never fail (since PHP stops evaluating the conditional if isset() returns false?