Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86608 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53188 invoked from network); 12 Jun 2015 03:24:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jun 2015 03:24:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.54 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.220.54 mail-pa0-f54.google.com Received: from [209.85.220.54] ([209.85.220.54:35101] helo=mail-pa0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/58-31453-FF05A755 for ; Thu, 11 Jun 2015 23:24:47 -0400 Received: by pacyx8 with SMTP id yx8so14134914pac.2 for ; Thu, 11 Jun 2015 20:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=QkfbWYo2zBGwc3MWjrqJRo6GzHE76ZPINLXY40hUt3E=; b=mqt6vinfuv9DGyxLy21T19NPmvwkDqKwSeMRguJancE63btPaLb2zO+cMX/qnTZDJ7 IctlLaBapSFzntu9mWdpJCIcmJHWIYQH/Wo5rzWS0GXbq7Yn9cbpYgNZyuEodkFvhYIp qzpBP8Gj0J0uz0aCHObA8A9vLzC4NaVi3/Rje+DD5eoorNewkcwMjqJy1UWcirh8NX9o AXcH/IBSy3P9BMaiKZBaVqs8tnmm48VS5v+nR8pawAaZUuFqsGRGCodNihlXkzDhyZU2 1afdZPW+y6I1zqgFtnBAbqw+1ze1UvnRFXKoBeJvX1UPytI53a1aWfxvkZr5EdOiWeTL gqxA== X-Received: by 10.66.118.166 with SMTP id kn6mr19408314pab.93.1434079483661; Thu, 11 Jun 2015 20:24:43 -0700 (PDT) Received: from [10.146.185.127] ([180.255.252.179]) by mx.google.com with ESMTPSA id l1sm1968019pdp.71.2015.06.11.20.24.42 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Jun 2015 20:24:42 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) X-Mailer: iPhone Mail (12F70) In-Reply-To: Date: Fri, 12 Jun 2015 11:24:40 +0800 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <5ACEF5F2-DF0D-485F-A40D-A6464EE3161D@gmail.com> References: To: Xinchen Hui Subject: Re: [PHP-DEV] PR #1325 - array_column() for array of objects From: tjerk.meesters@gmail.com (Tjerk Meesters) > On 12 Jun 2015, at 10:00 am, Xinchen Hui wrote: >=20 > Hey: >=20 > On Fri, Jun 12, 2015 at 9:31 AM, Tjerk Meesters > wrote: >> Hi, >>=20 >> I've created a PR here: https://github.com/php/php-src/pull/1325 >>=20 >> This enhancement allows for properties on objects to work in the same way= >> as arrays for the inner elements of the main array. >>=20 > IMO, it is called (array)_column... Please read more carefully, it's about supporting objects as the *inner elem= ents* of an array, not instead of an array.=20 >=20 > and if you really want do it against object, you can always easily > convert the object to array. >=20 > thanks >> It also supports the __get() method, provided that also __isset() is >> implemented and returns true for the addressed property. >>=20 >> The only BC I can imagine is when an array is populated with a mixed set o= f >> objects and arrays; any professional would baulk at the idea, but rules o= f >> the jungle are pervasive. >>=20 >> Before I merge this, are there any objections to shipping this with 7.0? >=20 >=20 >=20 > --=20 > Xinchen Hui > @Laruence > http://www.laruence.com/