Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89955 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81223 invoked from network); 1 Jan 2016 20:44:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jan 2016 20:44:58 -0000 Authentication-Results: pb1.pair.com header.from=jbafford@zort.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jbafford@zort.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zort.net designates 96.241.205.2 as permitted sender) X-PHP-List-Original-Sender: jbafford@zort.net X-Host-Fingerprint: 96.241.205.2 nova.zort.net Received: from [96.241.205.2] ([96.241.205.2:52042] helo=nova.zort.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/A1-06661-845E6865 for ; Fri, 01 Jan 2016 15:44:57 -0500 Received: from [10.0.1.2] (pulsar.zort.net [96.241.205.6]) (authenticated bits=0) by nova.zort.net (8.14.5/8.14.5) with ESMTP id u01KirPG027677 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 1 Jan 2016 15:44:53 -0500 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <070A1824-9ED7-4863-92AB-A4366AB92C98@zort.net> Date: Fri, 1 Jan 2016 15:44:52 -0500 To: PHP internals Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) Subject: [RFC] array_key_(first|last|index) functions proposal From: jbafford@zort.net (John Bafford) Happy New Year, everyone! I=E2=80=99d like to present the first new PHP RFC for this year, a = proposal to add functions to easily get the first, last, or an arbitrary = key (and value) by index from an array, taking advantage of PHP=E2=80=99s = property that arrays are ordered maps. RFC: https://wiki.php.net/rfc/array_key_first_last_index PR: https://github.com/php/php-src/pull/347 Thanks, -John