Req #46384 [Opn->Sus]: expr() or continue;
| From: | cmb@php.net | Date: | Wed, 09 Dec 2020 17:36:08 +0000 |
| Subject: | Req #46384 [Opn->Sus]: expr() or continue; | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-230974@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=46384&edit=1
ID: 46384
Updated by: cmb@php.net
Reported by: zyss at mail dot zp dot ua
Summary: expr() or continue;
-Status: Open
+Status: Suspended
Type: Feature/Change Request
Package: Scripting Engine problem
Operating System: RHEL4, WinXP
PHP Version: 5.2.6
Block user comment: N
Private report: N
New Comment:
This is debatable, and since this bug tracker is not suitable for
such discussion, please forward the feature request to the
internals mailing list. For the time being, I'm suspending this
ticket.
Previous Comments:
------------------------------------------------------------------------
[2008-10-27 20:09:44] zyss at mail dot zp dot ua
Yes, that's pretty obvious, but PHP could be modified to be able to do that. This change will
make code more clear (like ?: operator) therefore it is worth implementing.
------------------------------------------------------------------------
[2008-10-27 16:58:47] info at netmosfera dot it
because "break" and "continue" can't represents boolean values :)
------------------------------------------------------------------------
[2008-10-25 13:08:22] zyss at mail dot zp dot ua
Description:
------------
Why it is possible to write:
foo() or die("Can't foo");
but impossible to write:
foreach ($bars as $bar) {
foo($bar) or contine; // or break
do_something($bar);
}
Having this functionality would be very convenient as a short form of the following:
if (!foo($bar)) continue; // or break
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=46384&edit=1