#46384 [Com]: expr() or continue;
| From: | info at netmosfera dot it | Date: | Mon, 27 Oct 2008 16:58:49 +0000 |
| Subject: | #46384 [Com]: expr() or continue; | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-130217@lists.php.net to get a copy of this message | ||
ID: 46384
Comment by: info at netmosfera dot it
Reported By: zyss at mail dot zp dot ua
Status: Open
Bug Type: Feature/Change Request
Operating System: RHEL4, WinXP
PHP Version: 5.2.6
New Comment:
because "break" and "continue" can't represents boolean values :)
Previous Comments:
------------------------------------------------------------------------
[2008-10-25 21:11:06] zyss at mail dot zp dot ua
try
------------------------------------------------------------------------
[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 http://bugs.php.net/?id=46384&edit=1