Re: [RFC] Additional splat operator usage

From: Date: Sun, 23 Nov 2014 23:07:37 +0000
Subject: Re: [RFC] Additional splat operator usage
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-79107@lists.php.net to get a copy of this message
I always wanted to have an analog XPath to access the array elements. Something like: <?php $array = ['x' => ['p' => ['a' => ['t' => ['h' => 'value']]]]]; $xpath = ['x', 'p', 'a', 't', 'h']; $value = $array[...$xpath]; var_dump($value); // string(5) "value" ?> This is certainly a topic for another RFC, but this functionality will be useful in PHP.

« previous php.internals (#79107) next »