Hi Iija,

During the discussion of the precedence, you wrote:

> There is a reasonable way to recognize this, namely to check if the expression
> after the throw keyword is of type ZEND_AST_OR or ZEND_AST_AND. The
> expression above will fail with this message (given that $condition is false):

Did the RFC get updated to address this?

As the current behaviour listed* in the RFC seems wrong and surprising to me.

cheers
Dan
Ack


* relevant part:

> $condition || throw new Exception('$condition must be truthy')
>  && $condition2 || throw new Exception('$condition2 must be truthy');
> // Evaluated as
> $condition || (throw new Exception('$condition must be truthy') && 
> $condition2 || (throw new Exception('$condition2 must be truthy')));

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

Reply via email to