Si potrebbe fare


Codice PHP:
 switch(true) {


case 
$var == $value:
break;

case 
$othervar == $othervalue:
break;