#46384 [Opn]: expr() or continue;

From: Date: Sat, 25 Oct 2008 21:11:07 +0000
Subject: #46384 [Opn]: expr() or continue;
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-130110@lists.php.net to get a copy of this message
 ID:               46384
 User updated by:  zyss at mail dot zp dot ua
 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:

try


Previous Comments:
------------------------------------------------------------------------

[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



Thread (5 messages)

« previous php.bugs (#130110) next »