Hi Dan > Did the RFC get updated to address this? > > As the current behaviour listed* in the RFC seems wrong and surprising to me.
I did respond to that e-mail but probably got classified as spam as were the other e-mails I sent with that address. This was my response: > I've thought about this some more. 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): > > > Fatal error: Uncaught Error: Can only throw objects in ... > > IMO this is clear enough that a message for this edge case is not necessary. We could improve the error message by printing the type that got passed to throw: > Fatal error: Uncaught Error: Can only throw objects, bool given in ... Regards, Ilija -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php