Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61229 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75588 invoked from network); 14 Jul 2012 17:13:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jul 2012 17:13:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qa0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:57952] helo=mail-qa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/3D-20866-EB8A1005 for ; Sat, 14 Jul 2012 13:13:35 -0400 Received: by qafi31 with SMTP id i31so981016qaf.8 for ; Sat, 14 Jul 2012 10:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Ivaj5+en8nc71rbglImBEbPx3pGHsSVum+zWetSo7Ig=; b=DfjKrjiDHz14EBcWBTqMsEdBkX9MzbF+zyOM2rawi9NCSoQlMcE1RXSfDj1iuCTGEM QVAdMm6itevNDoGIEl/JtJUt/yhHP9PwtZV3H8fR2OfXSrsjYheVmMqBKP82EF4QdwVM +ggCl/cK1UZkwdyxljxJGN+QpL5y183kztMu2WwdrUQbwNiKT1m2KcrVD7RbXdpEHHsq tDuYpT/RKD7ZL38amYs0iM6q8q79Z+EGK8aoUQmAzKv3/dYACRfekLJ0l3C5xpWGAD21 fmRsNb2jODIZ7tQpkc9Wk+iIeIROqTXS2sRbPzAYSqpdjgev++CMfBWvFlxf/pBx3o+h Tq6Q== MIME-Version: 1.0 Received: by 10.229.136.200 with SMTP id s8mr3042754qct.46.1342286012499; Sat, 14 Jul 2012 10:13:32 -0700 (PDT) Received: by 10.229.182.4 with HTTP; Sat, 14 Jul 2012 10:13:32 -0700 (PDT) In-Reply-To: References: <5000BF44.3080907@sugarcrm.com> Date: Sat, 14 Jul 2012 13:13:32 -0400 Message-ID: To: Gustavo Lopes Cc: Stas Malyshev , Brandon Wamboldt , Andrew Faulds , internals Content-Type: multipart/alternative; boundary=002354530350f645de04c4cd5008 Subject: Re: [PHP-DEV] Re: array_last_key() function From: ircmaxell@gmail.com (Anthony Ferrara) --002354530350f645de04c4cd5008 Content-Type: text/plain; charset=ISO-8859-1 Gustavo, Why is the last key special? Why not a function to get the first or the > penultimate key? > How would such a function look? > Of course, there is one aspect where the first and last keys are special > -- if you have some algorithm where you pop or shift the array > successively. But in that case the argument about end() + key() having side > effects is irrelevant because you are changing the array anyway. How are you changing the array by getting the last (or first) key in this method? Could you elaborate on that? Anthony --002354530350f645de04c4cd5008--