Req #26411 [Com]: while {} else {}

From: Date: Tue, 10 May 2016 13:56:51 +0000
Subject: Req #26411 [Com]: while {} else {}
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200990@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=26411&edit=1

 ID:                 26411
 Comment by:         asd at asd dot asd
 Reported by:        php at bellytime dot com
 Summary:            while {} else {}
 Status:             Wont fix
 Type:               Feature/Change Request
 Package:            Scripting Engine problem
 Operating System:   *
 PHP Version:        *
 Block user comment: N
 Private report:     N

 New Comment:

Hey, it's an awesome feature everyone would like. Let's reject it!


Previous Comments:
------------------------------------------------------------------------
[2016-05-04 13:26:08] nikic@php.net

Related To: Bug #72148

------------------------------------------------------------------------
[2015-06-10 12:11:38] cmb@php.net

Related To: Bug #67843

------------------------------------------------------------------------
[2014-10-12 14:24:55] nikic@php.net

Closing as Wfx as this feature was rejected in https://wiki.php.net/rfc/loop_or.

------------------------------------------------------------------------
[2013-02-04 21:34:15] sebi at max-vision dot ro

I'd love something like this: if there is at least one iteration, even with break or continue,
don't do "else", otherwise, enter the else. 
Another great would be even better, something like "while(..){..}done{...}else{...}"

It could be a new keyword like "whileif".

Anyway, even the first proposed structure would be awesome.

------------------------------------------------------------------------
[2013-02-04 19:56:11] bensor987 at neuf dot fr

We shouldn't use "if" or "else" for this. We should use new keywords for
this. It seems simple to implement, but maybe they don't want this because of performance
concerns ?

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=26411


--
Edit this bug report at https://bugs.php.net/bug.php?id=26411&edit=1


Thread (28 messages)

« previous php.bugs (#200990) next »