Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77349 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37681 invoked from network); 19 Sep 2014 21:56:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2014 21:56:56 -0000 Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.182 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 74.125.82.182 mail-we0-f182.google.com Received: from [74.125.82.182] ([74.125.82.182:51268] helo=mail-we0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/93-13213-6A6AC145 for ; Fri, 19 Sep 2014 17:56:55 -0400 Received: by mail-we0-f182.google.com with SMTP id q59so389676wes.13 for ; Fri, 19 Sep 2014 14:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=rFHjhoJD4mX0z6veFBfcRKz+PeYAN/fZm5TX6tZC09U=; b=PYI9BW24Z/Tgvs9JU5nRSHpWg4+27ZkbEQy3zyOh7B56W/IN4WlpeeOiq8sah+0ftp itEyoIuOnrpc7fDW1xFx+ScmbYjABpmSNVjcIzdFngOfmrHmeAy2iF9N/WBQpOSPDN+P Omlz/dMptzoF8x8lHjN6I23yq/9lwEURMWKyfrvPJBxd8ONFbCCORKWQMxv2mgeVYGG6 AsMj682vnwJUvpyhBbO7WFPn/b2oRSPp5e2P5EoOJ9HU+19ZgbJjkdSjZGoL8s8HAWST Izeel9c7CVw0Nh+fEtfiey5xgrs/USXm3i4LqOkLV2Oa1duR4CsEAMVAS9Xlbn6a/XZg idNQ== MIME-Version: 1.0 X-Received: by 10.180.11.65 with SMTP id o1mr954583wib.58.1411163812261; Fri, 19 Sep 2014 14:56:52 -0700 (PDT) Received: by 10.217.55.195 with HTTP; Fri, 19 Sep 2014 14:56:52 -0700 (PDT) Date: Fri, 19 Sep 2014 22:56:52 +0100 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: [RFC] Loop... or... From: leight@gmail.com (Leigh) Hello list! This is an item that has been repeatedly requested in various forms, with no solid implementation to back it up, yet remaining quite desirable to the developer community at large. Loops with a default block, executed in the event that the loop is never entered. https://wiki.php.net/rfc/loop_or Traditionally this is requested as a loop {} else {} structure, however due to the choice of keyword this causes significant BC problems. I have written an RFC presenting this feature as loop {} or {} along with how I intend to implement it. I have consulted with several core contributors as well as normal developers, and this seems to be the most BC-complete option. A poll of local developers indicates a strong positive response supporting this feature, so please take the time to consider and discuss what is laid out in the RFC, as many of us would like this to become a permanent fixture of the language. I especially need input regarding Opcache concerns, as this is not an area of expertise for me. I will be developing the patch myself, and hope to have a full proof of concept completed by the end of this weekend. (for and while are both working, foreach currently segfaults, I am working on it) Thanks for reading. Leigh.