Req #67184 [Opn]: Allow THROW in expression context

From: Date: Tue, 28 Jun 2016 18:55:07 +0000
Subject: Req #67184 [Opn]: Allow THROW in expression context
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201891@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
 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)

« previous php.bugs (#201891) next »