On 9 September 2017 at 12:21, <ilija.tov...@me.com> wrote: > Hi everybody! > > Has this idea been discussed before? > .. > Each case has an implicit `break`
This part has come up before, as the default behaviour of fall through is a nasty gotcha for when you forget to put break. I can't find the conversation right now, but the discussion was around a 'select' keyword. I think the conversation didn't proceed as it seemed like adding a new keyword just to fix the fall-through behaviour was a bad tradeoff. This RFC idea adds more capabilities, so is a better trade-off, and more likely to be worth doing in my opinion. > One downside, since PHP doesn’t implicitly return the last statement > as some languages do there’s no obvious way to do multi-statement cases. People are still working on and hoping for short-closures. That RFC and any potential one for this, should attempt to use the same syntax. On 9 September 2017 at 13:11, Andreas Treichel <gmb...@gmail.com> wrote: > Something like: > > *wall_of_hard_to_read_code* Yeah, that's a pretty good example of why I'd be in favour of this RFC. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php