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

Reply via email to