Is this good practise … ie, grouping the default case with another?
switch ($cond){
case 1:
...;
break;
case 2:
...;
break;
case 3:
default:
...;
break;
}
It makes perfect sense to do it that way.
Also, @Ian is correct, but in a limited scope. If you wanted additional functionality applied to
case 3you would leave it the way it is. As long as you don’tbreak, it will go on to the nextcase.