Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96655 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37039 invoked from network); 30 Oct 2016 16:52:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Oct 2016 16:52:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.175 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.161.175 mail-yw0-f175.google.com Received: from [209.85.161.175] ([209.85.161.175:36146] helo=mail-yw0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/D3-25911-54526185 for ; Sun, 30 Oct 2016 11:52:23 -0500 Received: by mail-yw0-f175.google.com with SMTP id u124so123268044ywg.3 for ; Sun, 30 Oct 2016 09:52:21 -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=q2SDqBMPDRRR0Mrpxo3Akj0qhdjTQvr+QB+j4HJ24CY=; b=wyiH8ono0X+oYYoYEq0SfjgRq+G1Vu2G4rHA0vg7rJKe7D6YgME5ApK6Rc49BVGzZ9 Ekq392qoOP6gKZPtUv8xDzDMpg+2vEeK9bpEz65LLGi2fDqZpnHP2MiGAkXHyFhc/euH OltZSik2Bpie7I2rlBxF7o/KKhRt5XYwmf7W+GbkPPjuY4KVtVk2H4GRcd3Y4nugAKmL 5lRi+cy/zwiPUgjAguWRbXARj6iAg99+wkQsdLNnTiU0INF9CcM3B5uBvmv2o9onAULo nGoheSofHYF05yvhpbWezhZtxvXBW7ieVLqb2UG9KE/EXPe4jf6acblXmfWVKwKT7luA jWpA== 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=q2SDqBMPDRRR0Mrpxo3Akj0qhdjTQvr+QB+j4HJ24CY=; b=NjUoL2chzhjHSlTDqDOsRE4Y/L8dfkwqahthPjcvxmtQRCkydNvf/8RJVb+cfHOf6a IugtAUbQT5cquXYZugNTNCAWV0ENLxzsAf+gQYy0dh63Uyck0mfiDFPhfU6kQYwdapaZ yNAqKvT76S4LbDMtxCU+1m98XASLq9CvUw3LWfgdkS30LJVrbD5k7aGN0V7fW0S8bWgC lChmbYU58dUtXRKium8nFH5c8EG7FkwxIWtYTzF2H40bUPAPqHRlup4DLuzLbm34o5rf aM9ovJ2Pds65hFZcnr4XaK5i6pn5ypy6gOsanWwCHiROmfJGyaicvZvnPDggMUIp7iAL g/FA== X-Gm-Message-State: ABUngvfPWS1JH0aVhvr5jeagmSNXiq8vt15d9FypS/9+MOqYvd7PowGhv52yUVbMgBhgGJUFUJqSpcbm37/EsQ== X-Received: by 10.129.179.197 with SMTP id r188mr9220806ywh.3.1477846339026; Sun, 30 Oct 2016 09:52:19 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.13.200.3 with HTTP; Sun, 30 Oct 2016 09:52:18 -0700 (PDT) In-Reply-To: References: <44244cfd-c8ad-e0a9-4e70-380a8a8c940c@syberisle.net> Date: Sun, 30 Oct 2016 10:52:18 -0600 X-Google-Sender-Auth: 3--3mXYX8pVDQBL7ze8rwHybI0Q Message-ID: To: Yasuo Ohgaki Cc: Rasmus Schultz , Nikita Popov , David Lundgren , 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 Sun, Oct 30, 2016 at 10:31 AM, Levi Morrison wrote: > On Sun, Oct 30, 2016 at 7:30 AM, Yasuo Ohgaki wrote: >> On Sun, Oct 30, 2016 at 8:24 PM, Rasmus Schultz wrote: >>> I'd like to just remind you of the fact that some >>> of these functions, reset() and end() in particular, are often used >>> not because someone cares about moving the internal pointer, but as a >>> means of getting the first/last items of an array. >> >> I'm one of them. >> >> -- >> Yasuo Ohgaki >> yohgaki@ohgaki.net > > Are you after the last value, the last key, or both? To clarify, do you use the return value of these functions or rely on the IAP moving to also get the key?