Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64891 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49421 invoked from network); 12 Jan 2013 16:12:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2013 16:12:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=thruska@cubiclesoft.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=thruska@cubiclesoft.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cubiclesoft.com designates 74.208.44.107 as permitted sender) X-PHP-List-Original-Sender: thruska@cubiclesoft.com X-Host-Fingerprint: 74.208.44.107 u15404699.onlinehome-server.com Received: from [74.208.44.107] ([74.208.44.107:53829] helo=u15404699.onlinehome-server.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/24-24230-17B81F05 for ; Sat, 12 Jan 2013 11:12:33 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: thruska@cubiclesoft.com) with ESMTPSA id 9F02750000AE Message-ID: <50F18B59.8080809@cubiclesoft.com> Date: Sat, 12 Jan 2013 09:12:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: PHP Development References: <50F0FB3B.2090509@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] array_column() function From: thruska@cubiclesoft.com (Thomas Hruska) On 1/11/2013 11:53 PM, Anthony Ferrara wrote: >>From what I can see this new function doesn't fit any of those three to a > significant enough extent. All three are definitely subjective, but I'm > leaning towards a no vote because I just don't feel there's enough > justification for the new function when weighted against the bloat factor... > > My $0.02... Thoughts? > > Anthony I can see a use-case for this but the PDO relationship is a poor reason for having it. The whole PDO thing threw me off such that I was in the same boat as Anthony with the same thoughts. Contrived examples aren't helpful for passing a RFC. Here is a more reasonable example: echo implode(", ", array_column($myarray, 2)); It saves constructing a separate array or writing my own function in PHP userland that comes with the risk of naming conflicts. array_column() is a handy shortcut to a process. I've not thought about writing a PHP userland function for this before because it generally only takes a couple of lines of code. This formalizes that process and simplifies code. It isn't a function I'll necessarily use every day, but the above example is more useful and will speak to more developers than the PDO example will. I have a separate recommendation that could eliminate the need for the third optional parameter of array_column(), but I'll start another thread on this list for it. -- Thomas Hruska CubicleSoft President I've got great, time saving software that you might find useful. http://cubiclesoft.com/