It is possible to go to default
case from within some other case like this?
$a = 0;
$b = 4;
switch ($a) {
case 0:
if ($b == 5) {
echo "case 0";
break;
}
else
//go to default
case 1:
echo "case 1";
break;
default:
echo "default";
}
I tried to remove the else
and was expecting that it would continue evaluating all following cases until default
but it gets into case 1
then. Why is it so and how can I get to the default one?