> On 23 Nov 2014, at 23:07, S.A.N <ua.san.a...@gmail.com> wrote: > > 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.
That would be quite confusing, we don’t allow $array[‘x’, ‘p’, ‘a’, ’t’, ‘h’] just now. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php