Re: [RFC][DISCUSSION] switch expression

From: Date: Sat, 28 Mar 2020 19:29:14 +0000
Subject: Re: [RFC][DISCUSSION] switch expression
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-109400@lists.php.net to get a copy of this message
Op za 28 mrt. 2020 13:40 schreef Ilija Tovilo <tovilo.ilija@gmail.com>: > Hi internals > > Apparently my previous emails were classified as junk (very > flattering). Hopefully that issue is fixed now. > > I'd like to move the RFC switch expression to "under discussion". It > tries to address some of the common issues with the switch statement > by introducing a new switch expression. > > https://wiki.php.net/rfc/switch_expression > > I'm looking forward to your constructive feedback! > > Ilija > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php A minor remark; InvalidArgumentException really isn't applicable. No function is called, so there are no arguments. You'd throw an UnexpectedValueException. However, operations don't ever throw exceptions, but throw an error instead.

« previous php.internals (#109400) next »