Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61219 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19477 invoked from network); 14 Jul 2012 00:40:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jul 2012 00:40:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=brandon.wamboldt@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=brandon.wamboldt@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: brandon.wamboldt@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bk0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:52376] helo=mail-bk0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 48/14-20866-3EFB0005 for ; Fri, 13 Jul 2012 20:40:04 -0400 Received: by bkcjm19 with SMTP id jm19so3317504bkc.29 for ; Fri, 13 Jul 2012 17:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=y9924IaHRL0ZP0ArsVpCkJPbYUowJm70SRXhO+MTHX0=; b=B+99kE7gZblhmaa0MxFJd2XWdoNvBtTTfwNjHDhfwCcOR7WzfQ8AGik6Uwh9jchjVV A30J/OsFF8Xn0NXmRLX3h2EamhYoX3jXGI/mcqczVLe0AQff43wI3Eq8f0eL+hoecp7C MkQsshnTYdOrwWMn8euY7w1oXmdRfADD4tu0AbiXHwf7ABNlQGf69z6ScRnkbXQrwgMe hnIXgv/ON3946hFJK3yUjscthpbd2TkgBSHjxSizzzjhxc00pXliFzALH2LBEYGOH6sL YxYJpFQCIwQFTqQAAEqC1nCn71wnYpbjsPbFiqEi2PEe5zTGu/7YEIcBxeoot9V1orVz KeuQ== Received: by 10.205.127.72 with SMTP id gz8mr1824805bkc.121.1342226400118; Fri, 13 Jul 2012 17:40:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.140.139 with HTTP; Fri, 13 Jul 2012 17:39:39 -0700 (PDT) In-Reply-To: <5000BF44.3080907@sugarcrm.com> References: <5000BF44.3080907@sugarcrm.com> Date: Fri, 13 Jul 2012 21:39:39 -0300 Message-ID: To: Stas Malyshev Cc: Andrew Faulds , internals Content-Type: multipart/alternative; boundary=0015173fe992c988e304c4bf6fe2 Subject: Re: [PHP-DEV] Re: array_last_key() function From: brandon.wamboldt@gmail.com (Brandon Wamboldt) --0015173fe992c988e304c4bf6fe2 Content-Type: text/plain; charset=ISO-8859-1 Yeah, it would allow you to do this in one function call instead of three. If you are going to have an array_last_key() function, it makes sense to also have an array_first_key() function. After all, you could just do this: foreach ( $array as $key => $v ) {} echo $key; On Fri, Jul 13, 2012 at 9:37 PM, Stas Malyshev wrote: > Hi! > > > I like this idea. array_first_key would be nice too > > I am probably missing something, but what those would allow to do that > rewind/end+key() doesn't do? > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > > > -- *Brandon Wamboldt* Programmer / Web Developer StackOverflow Careers Profile- GitHub Profile - LinkedIn - My Blog --0015173fe992c988e304c4bf6fe2--