Is there any need to keep the final break in a switch which uses a default
at the end? I.e:
switch ($data) {
case 'foo':
# Action
break;
case 'bar':
# Action
break;
default:
# Action
break; # Is there any reason to keep this line?
}
I'm trying to aim for best practice levels of coding. (e.g. using ''
rather than "", etc. etc).
As far as I can see there seems no reason to do so and it improves
readability of code through and is (ultra-marginally) more efficient.
Martin Lucas-Smith www.geog.cam.ac.uk/~mvl22
Senior Computing Technician (Web Technician)
Department of Geography, University of Cambridge (01223 3)33390
& Webmaster, SPRI
Scott Polar Research Institute, University of Cambridge
Comment