Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61212 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6934 invoked from network); 13 Jul 2012 22:31:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jul 2012 22:31:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajfweb@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajfweb@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 74.125.82.47 as permitted sender) X-PHP-List-Original-Sender: ajfweb@googlemail.com X-Host-Fingerprint: 74.125.82.47 mail-wg0-f47.google.com Received: from [74.125.82.47] ([74.125.82.47:59154] helo=mail-wg0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/B1-20866-FB1A0005 for ; Fri, 13 Jul 2012 18:31:28 -0400 Received: by wgbfa7 with SMTP id fa7so2797260wgb.28 for ; Fri, 13 Jul 2012 15:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=FiG03LB2SD3WeHwWJLivEZGKsv9LNikqJ5k5RdINgQA=; b=mhyfe+Pp0tkyhDt8E8CIPyEDs7rUr/gFzBcwcGVzlxCKcTsUKzgG9ffypRVV0X1IdP HutwU4V5qSaCST/IxOIcjkf5KBlb7dgU6mNg7fc1iySV5NLW0NAljD4lwhBEZN/lRj6J mRImLb6x0kbuFU303Al/dL/mWNAEflPN5fJ9xPm2eVYIBUD1BRPGsj3NIBsvmnWwEFJb /Iimbqvn81H/WPkDcmEGxFrbSeOZkDnC5ctVDzucKhKf1ihT6rjJDuh989LZ25GPCryp zX6rNJi7XbEZiEIMBiSiTNSxJVorRg5ItHcEWGmJSlpQ4HWm1ktEVoPjQesGSBbWw6HD +cgw== Received: by 10.216.243.71 with SMTP id j49mr1550300wer.224.1342218685055; Fri, 13 Jul 2012 15:31:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.71.199 with HTTP; Fri, 13 Jul 2012 15:31:04 -0700 (PDT) Date: Fri, 13 Jul 2012 23:31:04 +0100 Message-ID: To: internals Content-Type: text/plain; charset=UTF-8 Subject: array_last_key() function From: ajfweb@googlemail.com (Andrew Faulds) 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/