php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #67184 Allow THROW in expression context
Submitted: 2014-05-03 05:10 UTC Modified: 2020-04-23 14:19 UTC
From: vovan-ve at yandex dot ru Assigned: cmb (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vovan-ve at yandex dot ru
New email:
PHP Version: OS:

 

 [2014-05-03 05:10 UTC] 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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-28 18:55 UTC] cmb@php.net
Related to bug #31627.
 [2020-04-23 14:19 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2020-04-23 14:19 UTC] cmb@php.net
<https://wiki.php.net/rfc/throw_expression> has been implemented,
so this ticket can be closed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 03:01:28 2024 UTC