Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67110 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96407 invoked from network); 22 Apr 2013 21:35:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Apr 2013 21:35:26 -0000 Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.181 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.212.181 mail-wi0-f181.google.com Received: from [209.85.212.181] ([209.85.212.181:64124] helo=mail-wi0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 74/D4-63341-C1DA5715 for ; Mon, 22 Apr 2013 17:35:25 -0400 Received: by mail-wi0-f181.google.com with SMTP id c10so5201023wiw.8 for ; Mon, 22 Apr 2013 14:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=hZN/euf/ac5PoaGNFSXVzcL2kJB16kBEBv9bVXsv9AQ=; b=otOFEkC0MSyYfCRaUpDJ580AKrhT8jMRz8snTSw38bdnnfo7h+9HZ91NDouiikC9uP FoeDrMRiS/19uleQRcbv9Kw2DPZlDpsueFRVljKUrDiPXNsi1t5mFaDZ7gD4VWYiCKm8 YJzpaxUp3KwENc/8Qwrx7GPYf4sPTI4jKqsNHDuqb8I3GQU3h//04REzZuZLVjhTAClO tW/kJ2rX9k/tWVsNVMIHE5rGJ57mPe3DIJe93sf9xW4XOJdygr8aO3jI/9Qbde64tI+i wmsHwEAdYlm8uz4dG/RZPWaa0RS0rdcUMvhDLlc+Dkv/adRFo2tDysFnEx++8N8zxV5p f90A== MIME-Version: 1.0 X-Received: by 10.194.173.228 with SMTP id bn4mr2110390wjc.20.1366666521342; Mon, 22 Apr 2013 14:35:21 -0700 (PDT) Received: by 10.227.25.77 with HTTP; Mon, 22 Apr 2013 14:35:21 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Apr 2013 17:35:21 -0400 Message-ID: To: Ben Ramsey Cc: PHP Internals Content-Type: multipart/alternative; boundary=089e0122e8dc87f83304daf9d818 Subject: Re: [PHP-DEV] Functionality updates to array_column() From: theanomaly.is@gmail.com (Sherif Ramadan) --089e0122e8dc87f83304daf9d818 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Apr 22, 2013 at 1:35 PM, Ben Ramsey wrote: > I've just submitted the following pull request for updates to the > array_column() function: > > https://github.com/php/php-**src/pull/331 > > I asked about these changes on the #php.pecl IRC channel a few weeks ago, > and others on the channel agreed that it was best to go ahead and submit > these changes while PHP 5.5 is still in beta, since these would potential= ly > create BC breaks once 5.5 is in RC or GA stages. > > I might be wrong here, but I thought beta was a feature freeze. Is it not? > I'm not certain of the proper process for handling these changes, though. > Do I need to update the RFC to account for these changes? Would I then ne= ed > to call for another vote? > > The changes are detailed on the PR, but I'm reproducing that description > here, for the sake of discussion: > > > This pull request updates the array_column() function to support the > following new functionality: > > * Maintain original index association if no third parameter > * Second param should be optional to use entire rows as result > * Support array of column names for second parameter > > Here are more detailed descriptions of the additional functionality: > > > ### Maintain original index association if no third parameter > > If no third parameter is passed, the resulting array maintains the indexe= s > passed in from the original array. Feature suggested by David Z=FClke. > > > ### Second param should be optional to use entire rows as result > > When NULL is passed as the second parameter, all columns from the input > array are returned. See https://bugs.php.net/bug.php?**id=3D64493 > > > ### Support array of column names for second parameter > > If the second parameter is an array of column names, each row returned in > the result array is an array containing only the specified columns. The > rows are indexed by the third parameter. Feature inspired by suggestions > from Hakre and Craig Campbell. See https://github.com/php/php-** > src/issues/257#issuecomment-**12594630 > > > Thanks, > Ben > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --089e0122e8dc87f83304daf9d818--