Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77810 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95415 invoked from network); 7 Oct 2014 17:16:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2014 17:16:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:54896] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/7D-30869-2DF14345 for ; Tue, 07 Oct 2014 13:16:04 -0400 Received: by mail.experimentalworks.net (Postfix, from userid 1003) id 4CCB7423BE; Tue, 7 Oct 2014 19:16:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on km31408.keymachine.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.2 X-Spam-HAM-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP Received: from [192.168.2.34] (ppp-93-104-2-196.dynamic.mnet-online.de [93.104.2.196]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id BF6D9423BD; Tue, 7 Oct 2014 19:16:10 +0200 (CEST) Message-ID: <1412702156.4712.215.camel@kuechenschabe> To: Mathias Grimm Cc: "internals@lists.php.net" Date: Tue, 07 Oct 2014 19:15:56 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] ArrayPath From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) 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 = 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=idx2/idx3 I'm not really convinced. johannes