Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61216 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14846 invoked from network); 14 Jul 2012 00:32:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jul 2012 00:32:40 -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:60076] helo=mail-bk0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FE/F2-20866-52EB0005 for ; Fri, 13 Jul 2012 20:32:38 -0400 Received: by bkcjm19 with SMTP id jm19so3315741bkc.29 for ; Fri, 13 Jul 2012 17:32:34 -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=ncY58509g9FgiYiKHAhW6ZQ02ZfSt9nrrr0aZ6phHhI=; b=z912N7U0kGPs3fB5NlRkben/xMuBcGHjH3M1peYt58/KEx1v5pes4uxw3RcqmEg99b 5xNHjiI811sHuNbuyEog5ZGRmzya57CUNETsF4KEyWrJMzI+Lp9JBxmNjbQktn+oIKA0 1fZ6jz+uMM5lC4j4YVrjMJdygkUcKyWGF+E1zX1BQv/aqnmp7h+XpfK4Pu1XwZ6D+mpF vEuGjWtDK6GxpGDoFVeDxdiIgFOBVkAQstKQbHOsfBs4wTeRUxNbuJ8Hq2huwp7tBY5B Q1gIWk4Tb5YJSeLVqrsuXtdH+WEv4EPcY5B3+3U2jvxG7kM6QG6nzYul2dUwMzRLVdOx cVUw== Received: by 10.204.152.152 with SMTP id g24mr1839875bkw.104.1342225954167; Fri, 13 Jul 2012 17:32:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.140.139 with HTTP; Fri, 13 Jul 2012 17:32:13 -0700 (PDT) In-Reply-To: References: Date: Fri, 13 Jul 2012 21:32:13 -0300 Message-ID: To: Andrew Faulds Cc: internals Content-Type: multipart/alternative; boundary=0015175d033634da2404c4bf5516 Subject: Re: [PHP-DEV] Re: array_last_key() function From: brandon.wamboldt@gmail.com (Brandon Wamboldt) --0015175d033634da2404c4bf5516 Content-Type: text/plain; charset=ISO-8859-1 I like this idea. array_first_key would be nice too On Fri, Jul 13, 2012 at 7:45 PM, Andrew Faulds wrote: > Changed, it now takes just an array. > > Function signature: > > mixed array_last_key(array $array) > > On 13 July 2012 23:31, Andrew Faulds wrote: > > Hi there, > > > > I'm proposing a function called array_last_key(), that takes a > > reference to an array, and returns the key of its last item. This is > > useful for finding out the key of the last item pushed to an array. > > Here's the pull request: https://github.com/php/php-src/pull/131 > > > > This is the first PHP extension function, and PHP test I've written. > > > > -- > > Andrew Faulds (AJF) > > http://ajf.me/ > > > > -- > Andrew Faulds (AJF) > http://ajf.me/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- *Brandon Wamboldt* Programmer / Web Developer StackOverflow Careers Profile- GitHub Profile - LinkedIn - My Blog --0015175d033634da2404c4bf5516--