On Sun, 22 Mar 2020 at 16:17, Ilija Tovilo <ilija.tov...@me.com> wrote:
>
> Due to the modest feedback I’d like to move the throw expression RFC to 
> “under discussion”.
>
> https://wiki.php.net/rfc/throw_expression
>

Regarding the example:

$condition || throw new Exception('$condition must be truthy')
  && $condition2 || throw new Exception('$condition2 must be truthy');

The "Deprecate left-associative ternary operator"* RFC made it so that
parentheses are required when ternary operators are nested in
complicated statements.

Would a similar requirement for parentheses around complicated throw
expressions be a suitable solution to avoid people being surprised by
the behaviour?

cheers
Dan
Ack

* https://wiki.php.net/rfc/ternary_associativity

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to