This RFC proposes adding a new match expression that is similar to switch but with safer semantics and the ability to return values. From the Doctrine query parser: // Before switch ($this->lexer->lookahead['type']) { case Lexer::T_SELECT: $statement = $this->SelectStatement(); break; case Lexer::T_UPDATE: $statement = $this->UpdateStatement(); break; case Lexer::T_DELETE: $statement = $this->Dele