Req #67184 [Opn->Csd]: Allow THROW in expression context
| From: | cmb@php.net | Date: | Thu, 23 Apr 2020 14:19:49 +0000 |
| Subject: | Req #67184 [Opn->Csd]: Allow THROW in expression context | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-226741@lists.php.net to get a copy of this message | ||
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
+Status: Closed
Type: Feature/Change Request
Package: Scripting Engine problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
<https://wiki.php.net/rfc/throw_expression>
has been implemented,
so this ticket can be closed.
Previous Comments:
------------------------------------------------------------------------
[2016-06-28 18:55:06] cmb@php.net
Related to bug #31627.
------------------------------------------------------------------------
[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