Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80626 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61467 invoked from network); 16 Jan 2015 08:41:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jan 2015 08:41:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.47 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.47 mail-qg0-f47.google.com Received: from [209.85.192.47] ([209.85.192.47:48907] helo=mail-qg0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/44-39838-CBEC8B45 for ; Fri, 16 Jan 2015 03:41:32 -0500 Received: by mail-qg0-f47.google.com with SMTP id j5so1870230qga.6 for ; Fri, 16 Jan 2015 00:41:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=SODBnAKknuGrl5jl29vEeHBVbMB6A+tVBhMb6lINFQ0=; b=x4F/WW8FUC0whWOAPTxT2A9Z7c5DaTAyIVDs5Ldi31/7lFYpkW7s6LQ+Z6t/TrpvtJ urRkIQzomnelMq0VcZLi7MpKBcWKUbaD6Bj+E4BNInCsitjCobk+HS3sLdYfdNW0QIiP KokOaBdXX3yI3tne/LFy/WJ81DrPAP4iGfvFR0olYQjzIv9G+Q7t9NRSRqiBDsBa89yp IITo6ZTJrxkwRY7jwkjU3LMbQV3t2h6jSSlAUcOygDmtcZSbh58WfqsmRFuwrAfnO2xK MKEjjX0VAjXONaSjbu/LE8r2Fq5DeTxia3mVelM0MAxvxwrh68M06g9SBE6uiUO7JJw8 mSrA== X-Received: by 10.224.162.203 with SMTP id w11mr22777065qax.21.1421397689877; Fri, 16 Jan 2015 00:41:29 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.93.70 with HTTP; Fri, 16 Jan 2015 00:40:49 -0800 (PST) Date: Fri, 16 Jan 2015 17:40:49 +0900 X-Google-Sender-Auth: 3TgAvoe6UECOsABxnbbUVc5Z2Rw Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0129557463cb0b050cc0f055 Subject: Fixing strange foreach behavior. From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e0129557463cb0b050cc0f055 Content-Type: text/plain; charset=UTF-8 Hi all, Take a look at http://3v4l.org/HbVnd foreach should not affect internal(zval) array position, but it does. I'm not sure why foreach works this way, but HHVM behavior is reasonable. IMHO. PHP 7 would be perfect opportunity fix this behavior. Any comments? Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e0129557463cb0b050cc0f055--