Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79108 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83700 invoked from network); 23 Nov 2014 23:35:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2014 23:35:51 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:44780] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/E1-05261-55F62745 for ; Sun, 23 Nov 2014 18:35:51 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 87A4DB0008E; Sun, 23 Nov 2014 18:35:46 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NhUlGfgg8CKC; Sun, 23 Nov 2014 18:35:46 -0500 (EST) Received: from oa-res-27-210.wireless.abdn.ac.uk (oa-res-27-210.wireless.abdn.ac.uk [137.50.27.210]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id C372EB00068; Sun, 23 Nov 2014 18:35:45 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: Date: Sun, 23 Nov 2014 23:35:43 +0000 Cc: Rowan Collins , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: <4C38F111-AEEB-47BC-A03B-080582F735FC@ajf.me> References: <545D0611.9010206@gmail.com> To: "S.A.N" X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Additional splat operator usage From: ajf@ajf.me (Andrea Faulds) > On 23 Nov 2014, at 23:07, S.A.N wrote: >=20 > I always wanted to have an analog XPath to access the array elements. > Something like: >=20 > =20 > $array =3D ['x' =3D> ['p' =3D> ['a' =3D> ['t' =3D> ['h' =3D> = 'value']]]]]; > $xpath =3D ['x', 'p', 'a', 't', 'h']; > $value =3D $array[...$xpath]; >=20 > var_dump($value); // string(5) "value" >=20 > ?> >=20 > This is certainly a topic for another RFC, but this functionality will = be > useful in PHP. That would be quite confusing, we don=E2=80=99t allow $array[=E2=80=98x=E2= =80=99, =E2=80=98p=E2=80=99, =E2=80=98a=E2=80=99, =E2=80=99t=E2=80=99, = =E2=80=98h=E2=80=99] just now. -- Andrea Faulds http://ajf.me/