Re: [PHP-DEV] [RFC][DISCUSSION] throw expression

March 25, 2020 19:37 (Ilija Tovilo)
Hi Andrea

> I would think we can just give `throw` an appropriate precedence so that expressions like the above do what is desired
The example are taken from the RFC online. The following expression is already possible: ```php throw $condition1 && $condition2 ? new Exception1() : new Exception2(); ``` To make sure it keeps working the precedence needs to me very low. Thus the precedence might be slightly surprising which is why Dan suggests printing a warning. Regards