Rowan's World, et Cetera

The Case for a better Switch

by Rowan on 8 August, 2009

The C-style switch-case construct – used in various programming languages, including PHP – is a curious beast. Most commonly used as a streamlined form of if-elseif-else, it actually has more in common with the oldest of control statements, the goto, since control jumps to the first match and carries on until you tell it to […]