Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77811 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96988 invoked from network); 7 Oct 2014 17:22:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2014 17:22:19 -0000 Authentication-Results: pb1.pair.com header.from=mathiasgrimm@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mathiasgrimm@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.179 as permitted sender) X-PHP-List-Original-Sender: mathiasgrimm@gmail.com X-Host-Fingerprint: 209.85.223.179 mail-ie0-f179.google.com Received: from [209.85.223.179] ([209.85.223.179:53820] helo=mail-ie0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 09/CD-30869-A4124345 for ; Tue, 07 Oct 2014 13:22:19 -0400 Received: by mail-ie0-f179.google.com with SMTP id ar1so5827985iec.38 for ; Tue, 07 Oct 2014 10:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=eyv1kFp75xngo5BOHLF2gFLp33+TQcXsB0/JymSCFR8=; b=G+iECzI4QRX3FqwhMbxZJXUKDaT6sw7mxnWMDdzeLXHBFsj49ZaRZYto4D+fK62nSz 7ccaAi6VA5UtwhFQPeHl/Il5XUO5jns8L49u54ocKXIId+SsAG+YklXQFFW4GYuS3F2u 8XlYP5qadTSdYGTkdj8a0f0/wA9y97fNs/UdOslhUIFccrYQ1FndB8i65Wl/GgtpcUnv /2hyXgM76pD+3tP8nMX0LXKFB9GpAp5CEUrqg6ue/QYFY9qobaNowhfqveHAGxQkaUSY MCpYlgtx7iatWqETTCL/fEvCD2jbEUFNFmQPWfua0flDs5wKpUA8t14FnOc09uKjOXoW sNoA== MIME-Version: 1.0 X-Received: by 10.50.66.133 with SMTP id f5mr33647739igt.38.1412702536489; Tue, 07 Oct 2014 10:22:16 -0700 (PDT) Received: by 10.64.76.136 with HTTP; Tue, 7 Oct 2014 10:22:16 -0700 (PDT) In-Reply-To: <1412702156.4712.215.camel@kuechenschabe> References: <1412702156.4712.215.camel@kuechenschabe> Date: Tue, 7 Oct 2014 18:22:16 +0100 Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7bdc0faedc62dc0504d870b4 Subject: Re: ArrayPath From: mathiasgrimm@gmail.com (Mathias Grimm) --047d7bdc0faedc62dc0504d870b4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable That would cause some problems indeed. But you could scape as in other strings. at('a/\/b') not nice but we have the same for every string On Tuesday, October 7, 2014, Johannes Schl=C3=BCter wrote: > On Tue, 2014-10-07 at 17:05 +0100, Mathias Grimm wrote: > > Hi, > > I would like to suggest something for php like a class I am using > > > > https://github.com/mathiasgrimm/arraypath > > > > The reason is to access arrays like this: > > > > $idx3 =3D ArrayPath::get('idx1/idx2/idx3', $_POST, 'myDefaultValue'); > > what hppens if my array has a / as part of the key? Do I have to check > that beforehand and set a custom identifier? So what happens if I use > your example with $_GET instead of $_POST and a user requests > foo.php?idx1=3Didx2/idx3 > > I'm not really convinced. > > johannes > > --047d7bdc0faedc62dc0504d870b4--