Req #67184 [Opn]: Allow THROW in expression context
Edit report at https://bugs.php.net/bug.php?id=67184&edit=1
ID: 67184
Updated by: cmb@php.net
Reported by: vovan-ve at yandex dot ru
Summary: Allow THROW in expression context
Status: Open
Type: Feature/Change Request
Package: Scripting Engine problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Related to bug #31627.
Previous Comments:
------------------------------------------------------------------------
[2014-05-03 05:10:40] vovan-ve at yandex dot ru
Description:
------------
Currently, THROW is a statement. We are not allowed to write things like this:
do_something(...)
or throw new Exception(...)
;
It whould be nice to convert THROW from statement to unary operator.
Same things also can be applyed, for example, to RETURN, BREAK, CONTINUE and GOTO statements.
Right precedence for this operators should be discussed.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67184&edit=1
Thread (3 messages)