Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77807 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89348 invoked from network); 7 Oct 2014 16:22:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2014 16:22:21 -0000 Authentication-Results: pb1.pair.com header.from=matthewfonda@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=matthewfonda@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.178 as permitted sender) X-PHP-List-Original-Sender: matthewfonda@gmail.com X-Host-Fingerprint: 209.85.213.178 mail-ig0-f178.google.com Received: from [209.85.213.178] ([209.85.213.178:41059] helo=mail-ig0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/5C-30869-A3314345 for ; Tue, 07 Oct 2014 12:22:19 -0400 Received: by mail-ig0-f178.google.com with SMTP id l13so5037139iga.5 for ; Tue, 07 Oct 2014 09:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=BbrCVuVwvS8aAxRpPl+QVWdCklruTbKcse646LKBS8g=; b=Cc4YzPvHj9mPCMFzcYcMhqVlxCYX0jfLIdEFRpCLAPtHMScSuxeAsHN3LubwTh4Oy3 8vz5vbsmGy+z+CfMUI/UkBS+R6kmJS1LkVqneXZjeyr9d1P3iUccEoXLRhp3a9h9PpzI 7Y2Ek9tlyPcSbMbVdOwhuESafPiyXH1S8J/jDZ8C/PLRuKfdu/i4m6flE9iqxFSDF+8L IFR4oIZanXG4oLH7N6Immsddu0xDuIccB+yYnmDCqMp7LJv5naCHGLJVbz01ThQgtLCB uL/K3xUljG5vbSXBGgGEcsmcnPr+kwLHNqePZV0A0hjILttMt1f555NY7HyclFsLY84h F5RA== X-Received: by 10.43.138.134 with SMTP id is6mr5736804icc.96.1412698935548; Tue, 07 Oct 2014 09:22:15 -0700 (PDT) MIME-Version: 1.0 Sender: matthewfonda@gmail.com Received: by 10.50.92.101 with HTTP; Tue, 7 Oct 2014 09:21:45 -0700 (PDT) In-Reply-To: References: Date: Tue, 7 Oct 2014 09:21:45 -0700 X-Google-Sender-Auth: y6yMiYX-nmLsd1YyM0N_M7rGNIo Message-ID: To: Mathias Grimm Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c2e0963a645d0504d79a07 Subject: Re: [PHP-DEV] ArrayPath From: mfonda@php.net (Matthew Fonda) --001a11c2e0963a645d0504d79a07 Content-Type: text/plain; charset=UTF-8 On Tue, Oct 7, 2014 at 9:05 AM, 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'); > > > Regards, > Mathias > Hi Mathias, The new null coalesce operator in PHP 7 achieves what you're looking for here. See https://wiki.php.net/rfc/isset_ternary Best regards, --Matthew --001a11c2e0963a645d0504d79a07--