Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73739 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24680 invoked from network); 18 Apr 2014 05:50:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2014 05:50:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.67 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.67 smtp67.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.67] ([108.166.43.67:40318] helo=smtp67.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/21-17736-C0DB0535 for ; Fri, 18 Apr 2014 01:50:04 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id CEC4D14928E; Fri, 18 Apr 2014 01:50:01 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp1.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 5D673149625; Fri, 18 Apr 2014 01:50:01 -0400 (EDT) Message-ID: <5350BD08.5020605@sugarcrm.com> Date: Thu, 17 Apr 2014 22:50:00 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Tjerk Meesters , PHP Internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [pr-645] Add offset to reset() and end() From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > I've added a PR that satisfies #31375. > > https://github.com/php/php-src/pull/645 > > It adds a second optional argument to reset() and end() to specify the > number of elements that should be skipped (forward or backward). I'm not sure end() part makes sense for most iterators (I know reset and end doesn't currently work on Iterator, but at least for reset there's no reason why it should not). For reset, it's pretty trivial to implement it in user code. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227