Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81420 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23344 invoked from network); 30 Jan 2015 10:52:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jan 2015 10:52:52 -0000 Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.170 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 74.125.82.170 mail-we0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:43708] helo=mail-we0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B1/00-23158-2826BC45 for ; Fri, 30 Jan 2015 05:52:51 -0500 Received: by mail-we0-f170.google.com with SMTP id w55so20979571wes.1 for ; Fri, 30 Jan 2015 02:52:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=kZbhrFi+B/ftvBm0NUmVPDuR3tjuWXcO8OdySefQDW4=; b=r/4Ot+Ee4xSc7q8TE/nJVvVMuQYBN4TM4Tn53xXGyIqCFvW6g/srKtaXfRQRzBFiPI HlmoBe01AtqbjrCmrzLBEyTNMYVtibGkIE42MoYTNTejFsv29zShCY1jJnnYkWx37BTK 4qLN3N60s9sQj2x0Q78pPvsj2/KxgAti4vdstt8FpgiZOOCWZcFulTJIisEZNgznVSH/ mlvVJkK0KAuVXqL6LLVagTrYKwMmKsHTO0E4Bhch8l0dgw7V1FSwohNS70DWWKRQ00LF NsfXBaSw2jhJ8KEeq4p5Q4O3/DGlCCDNFl8qyfvbIlLBTADesBx+ZaXHVhWto4K2UgWQ nbdQ== X-Received: by 10.180.88.33 with SMTP id bd1mr3630435wib.10.1422615167760; Fri, 30 Jan 2015 02:52:47 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.194.170.193 with HTTP; Fri, 30 Jan 2015 02:52:07 -0800 (PST) In-Reply-To: References: Date: Fri, 30 Jan 2015 11:52:07 +0100 X-Google-Sender-Auth: fGZfepllHIqjgdpV2FFsqpP09jk Message-ID: To: Dmitry Stogov Cc: PHP Internals , Nikita Popov Content-Type: multipart/alternative; boundary=f46d0444e8fdb9fc88050ddc6775 Subject: Re: [PHP-DEV] [RFC] Fix "foreach" behavior From: jpauli@php.net (Julien Pauli) --f46d0444e8fdb9fc88050ddc6775 Content-Type: text/plain; charset=UTF-8 On Fri, Jan 30, 2015 at 8:23 AM, Dmitry Stogov wrote: > Hi, > > I'd like to start discussion about fixing inconsistent "foreach" statement > behavior. > The implementation is almost done. It not only fixes inconsistencies in a > defined by RFC way but also improves performance in most usual cases, > because now foreach by value over array doesn't require array duplication. > > https://wiki.php.net/rfc/php7_foreach > > https://github.com/php/php-src/pull/1034 > > I'm going to continue work on implementation improvement and may be fixing > related behavior of some internal functions when they used on array > iterated by foreach by reference (e.g. array_unshift()). However, the > conceptual behavior defined in RFC is not going to be changed anymore. > > Thanks. Dmitry. > Nice job Dmitry, as usual ! Julien --f46d0444e8fdb9fc88050ddc6775--