Yo dawg, you can use the cool new goto function.
<?php $func = "orange"; function doDefault() { echo "yeehaw!"; return; } function dobar() { return; } function dosomethingElse() { return; } switch ($func) { case 'foo': dobar(); break; case 'orange': if (true) { goto defaultlabel; } else { dosomethingElse(); } break; default: defaultlabel: doDefault(); }
Janus Troelsen
source share