跳转到PHP switch语句中的另一种情况

问题描述:

说我有这样的东西:

switch ($_GET['func']) {
    case 'foo':
        dobar();
        break;
    case 'orange':
        if ($_GET['aubergine'] == 'catdog') {
            // **DO DEFAULT OPTION**
        } else {
            dosomethingElse();
        }
        break;
    default:
        doDefault();
}

如何从case 'orange'中的标记点跳到default案例?

How can I jump to the default case from the marked spot in case 'orange'?

尝试:

switch($_GET['func']) {
  case 'foo':
    dobar();
    break;

  case 'orange':
    if($_GET['aubergine'] != 'catdog') {
        dosomethingElse();
        break;
    }

  default:
    doDefault();
}