Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96614 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9664 invoked from network); 26 Oct 2016 13:43:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Oct 2016 13:43:07 -0000 Authentication-Results: pb1.pair.com header.from=dlundgren@syberisle.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dlundgren@syberisle.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain syberisle.net designates 96.126.116.40 as permitted sender) X-PHP-List-Original-Sender: dlundgren@syberisle.net X-Host-Fingerprint: 96.126.116.40 mail.syberisle.net Received: from [96.126.116.40] ([96.126.116.40:45309] helo=li341-40.members.linode.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1A/F9-24108-8E2B0185 for ; Wed, 26 Oct 2016 09:43:05 -0400 Received: from localhost (admin.local [127.0.0.1]) by li341-40.members.linode.com (Postfix) with ESMTP id BE4D625253 for ; Wed, 26 Oct 2016 09:43:01 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at syberisle.net Received: from li341-40.members.linode.com ([127.0.0.1]) by localhost (syberisle.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i6NYLJTyPd-r for ; Wed, 26 Oct 2016 09:43:00 -0400 (EDT) Received: from oo-laptop.local (cpe-65-29-233-211.wi.res.rr.com [65.29.233.211]) (Authenticated sender: dlundgren@syberisle.net) by li341-40.members.linode.com (Postfix) with ESMTPSA id AAA6425252 for ; Wed, 26 Oct 2016 09:43:00 -0400 (EDT) To: internals@lists.php.net Message-ID: <44244cfd-c8ad-e0a9-4e70-380a8a8c940c@syberisle.net> Date: Wed, 26 Oct 2016 08:42:59 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Allow Iterator to be used with current, next, reset, key functions From: dlundgren@syberisle.net (David Lundgren) 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