Re: [PHP-DEV] Inline switch as alternative to nested inline conditional

2019-10-15 Thread MichaƂ Brzuchalski
Hi David, I'm interested in this feature this is called switch expression and is on my list of RFC to process after Object Initializer RFC. I have an RFC in draft for that and planning to finish it soon together with some syntax optimisations - you can see it at

[PHP-DEV] Re: Inline switch as alternative to nested inline conditional

2019-10-15 Thread Mark Randall
On 16/10/2019 02:46, David Rodrigues wrote: Hello. I like to suggests a discussion about a FR to make possible to inline switch, as an alternative to nested inline conditionals. ``` http://www.php.net/unsub.php

[PHP-DEV] Inline switch as alternative to nested inline conditional

2019-10-15 Thread David Rodrigues
Hello. I like to suggests a discussion about a FR to make possible to inline switch, as an alternative to nested inline conditionals. $value = switch (expr()) { case A1: return A2; case B1: return B2; default: return C; } Instead of: $expr = expr(); $value = $expr == A1 ? A2 : (

Re: [PHP-DEV] [VOTE] Reclassifying engine warnings

2019-10-15 Thread Christoph M. Becker
On 15.10.2019 at 10:27, Gert wrote: > I may be a bit late to this party, but will the promotion to error > exception of illegal offsets also happen for using resources as array > keys? These currently produce a notice, and are then casted to an > integer: https://3v4l.org/cQ8hf > Or will the

Re: [PHP-DEV] [VOTE] Reclassifying engine warnings

2019-10-15 Thread Gert
I may be a bit late to this party, but will the promotion to error exception of illegal offsets also happen for using resources as array keys? These currently produce a notice, and are then casted to an integer: https://3v4l.org/cQ8hf Or will the behaviour of that remain the same? On Fri, 11 Oct