Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96633 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44646 invoked from network); 28 Oct 2016 12:43:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Oct 2016 12:43:18 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.182 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.213.182 mail-yb0-f182.google.com Received: from [209.85.213.182] ([209.85.213.182:33981] helo=mail-yb0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/20-43407-4E743185 for ; Fri, 28 Oct 2016 08:43:17 -0400 Received: by mail-yb0-f182.google.com with SMTP id f97so34752501ybi.1 for ; Fri, 28 Oct 2016 05:43:16 -0700 (PDT) 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; bh=PWA/3Y/t2PgALYBO/a8gVabJaVWZVTASRFoKmC80k+c=; b=c9snKMhELl4QrD3LtKY6P7gcn1RGDdsU2cTqZcD9P0P9Rt8XVp/zWKwZk6JC/VD5LY 8EVwO7LKX3oCwsP8T7a1rpD65zha9ke9sRdIEHAHVyl7cTWViNFxyq5x8hP6+i225bpH DoGO4FTyLDzMGpVTYTp+Yfi+upfIwZtDYpTH6SbXdltamsM11bLS3w1NXYXfVJz899lZ +FdeY2P0YDNvc9N445B7rZreqATj8z4Cdfc9aj8LO6G5Ggys2cH4VWEZtpC/chq0m/n8 TJ0EfL+GgJkM1WZ9oyxZqxHs5MbW6hkknqM7hrC6FFilqzWlSim3NsVAJpIasht6MF5o 7+Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=PWA/3Y/t2PgALYBO/a8gVabJaVWZVTASRFoKmC80k+c=; b=aR2LzQoSznFyw9SzkWUnKqysakEJSgxN9+3MP1Fau0Gu45aWn59TopL9zzKtNK27no FBU+CsVGFo0umgPN3JdR/KmmFvjPzE1pbGVS7eoR9pNyhGDgqPz3gg3O+xXQtERr5S6D NoglWcDazTLsdQ1NjPObizU5lOofI2XNA53hwYRdgKiVyFDGvXz7aL5EAup+bHWfvnuO 0CJgwM0Ionl7295s30eIyfVNHqUZ1CK+IzgerADY7iF47SrtHHOYj6JSuhGYBI2ayPCh DmfJef7uqN8bMz4H5AH4P4OvZmcIm3ZsEYIQW3PCtRhAJq8JcEAZ1jyEPSifhdqkO5gI W3QQ== X-Gm-Message-State: ABUngveEHKVefyd6/xRgtMCWa7KBjN4arciC/Najo+mZNRk3XYji2wSnQLUjNV2n4tzgqH87NBGJyOdj2FTfGg== X-Received: by 10.37.97.197 with SMTP id v188mr11929642ybb.146.1477658593332; Fri, 28 Oct 2016 05:43:13 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.13.200.3 with HTTP; Fri, 28 Oct 2016 05:43:12 -0700 (PDT) In-Reply-To: <44244cfd-c8ad-e0a9-4e70-380a8a8c940c@syberisle.net> References: <44244cfd-c8ad-e0a9-4e70-380a8a8c940c@syberisle.net> Date: Fri, 28 Oct 2016 06:43:12 -0600 X-Google-Sender-Auth: vuB4qMuWAroCfv6FK9gKvfQR5bQ Message-ID: To: David Lundgren Cc: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Allow Iterator to be used with current, next, reset, key functions From: levim@php.net (Levi Morrison) On Wed, Oct 26, 2016 at 7:42 AM, David Lundgren wrote: > Greetings, > > As suggested by several reviewers of a PR[1] I recently submitted, I'd > like to get feedback on letting custom Iterators be used in the current, > next, reset, and key functions. If this is something to move forward > with, I'll need some help with the RFC process. > > Recent experiences trying to use these functions with a custom Iterator, > and a bug[2], led me to try and fix this. BC will occur when an object > implementing Iterator is passed to one of the functions, as the > interface methods will be called, instead of returning the objects > properties. The old behavior should be maintained for classes that do > not implement Iterator. > > [1] https://github.com/php/php-src/pull/2176 > [2] https://bugs.php.net/bug.php?id=49369 > > Thanks, > Dave > -- > David Lundgren > dlundgren@syberisle.net > 808.639.0365 > GPG: 0x26F54D7F > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php I can't seem to recall specifics anymore but I do believe some people would greatly prefer to remove the internal array pointer for iteration and deprecate these functions. Maybe someone else can remember more? Nikita and Bob, maybe?