A switch may gain you time though in situations where you have elseif's in there, as each elseif has to re-evaluate the conditional expression, whereas it is only evaluated once in a switch.
Surprisingly, comparing:
if ($foo == 1) {
} elseif ($foo == 2) {
} elseif ($foo == 3) {
} else {
}
and
switch ($foo)
{
case 1:
break;
case 2:
break;
case 3:
break;
default:
}
a million times gave this result in seconds:
$foo if switch
1 0.205 0.249
2 0.287 0.329
3 0.382 0.422
4 0.395 0.395
I guess that the kind of optimisations possible for a switch for say, a C++ compiler is not so possible in normal PHP execution.