Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86607 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46053 invoked from network); 12 Jun 2015 02:00:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jun 2015 02:00:33 -0000 Authentication-Results: pb1.pair.com header.from=laruence@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=xinchen.h@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.216.54 as permitted sender) X-PHP-List-Original-Sender: xinchen.h@zend.com X-Host-Fingerprint: 209.85.216.54 mail-vn0-f54.google.com Received: from [209.85.216.54] ([209.85.216.54:40724] helo=mail-vn0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/C7-31453-E3D3A755 for ; Thu, 11 Jun 2015 22:00:31 -0400 Received: by vnbf7 with SMTP id f7so3674896vnb.7 for ; Thu, 11 Jun 2015 19:00:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=AOr3n4Zwm4xjuShmIfsdxpHm7LvjJ9QwmsbzmhhxC3Q=; b=kABprkG3uRsMpzgvAmr3Ndw+7IC4+URf+LP9HxNh80zmYNnH/s5u9SYN0CybHi9jiC aTnrfguvkGm1zhzX1Ru51I6Xz658b9mDeDLXlu3hY/GHRZ+L4HTvaf+nRR633K6icv0V W6sJZdSStCkfOD7SwflxLqQSFRQpaZF/qiNTHyk7P4yLT4+agoYfilYosp68F2FplAMf QgAnyYbkxMIPIzPeiobOBSghUMJEiutXoT6CVuoRkiuxLNybMoqf0u7zQDfMizLaqhkE SwhkA18causqmOo1bZWd1b68caDqmOG3KbUgjoRyHNOosdL68Qep+yIjZtH87s9dU9s2 Tl/w== X-Gm-Message-State: ALoCoQm2Zv3YNzYc+IwVdx93D1VKcnenUDqg+0BXPTUGEKFoIvjn6Q6av+GoPZP31KVnGZrttodU0Of3LltYVwaD6ui3MwrW2Qiga4bz0sRNnkkp+IehS2BthsiRxHqSYX6p85pD49ccCwift576SCx72CWTIDin+dSm79+WjJle4Z26AfxG6dA= X-Received: by 10.52.170.237 with SMTP id ap13mr21531570vdc.5.1434074427324; Thu, 11 Jun 2015 19:00:27 -0700 (PDT) Received: from mail-vn0-f44.google.com (mail-vn0-f44.google.com. [209.85.216.44]) by mx.google.com with ESMTPSA id co1sm2951449vdd.12.2015.06.11.19.00.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jun 2015 19:00:26 -0700 (PDT) Received: by vnbg1 with SMTP id g1so3690874vnb.3 for ; Thu, 11 Jun 2015 19:00:26 -0700 (PDT) X-Received: by 10.52.180.102 with SMTP id dn6mr21508495vdc.17.1434074426323; Thu, 11 Jun 2015 19:00:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.12.1 with HTTP; Thu, 11 Jun 2015 19:00:06 -0700 (PDT) In-Reply-To: References: Date: Fri, 12 Jun 2015 10:00:06 +0800 Message-ID: To: Tjerk Meesters Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] PR #1325 - array_column() for array of objects From: laruence@php.net (Xinchen Hui) Hey: On Fri, Jun 12, 2015 at 9:31 AM, Tjerk Meesters wrote: > Hi, > > I've created a PR here: https://github.com/php/php-src/pull/1325 > > This enhancement allows for properties on objects to work in the same way > as arrays for the inner elements of the main array. > IMO, it is called (array)_column... and if you really want do it against object, you can always easily convert the object to array. thanks > It also supports the __get() method, provided that also __isset() is > implemented and returns true for the addressed property. > > The only BC I can imagine is when an array is populated with a mixed set of > objects and arrays; any professional would baulk at the idea, but rules of > the jungle are pervasive. > > Before I merge this, are there any objections to shipping this with 7.0? -- Xinchen Hui @Laruence http://www.laruence.com/