Hi, On Thu, Jan 9, 2020 at 1:05 PM Nikita Popov <nikita....@gmail.com> wrote: > > [...] we already support > "$string" and "$object->prop", so it is in a way natural that > "$array['key']" is also supported, as the last of the "fundamental" > variable syntaxes.
What about rather deprecating "$object->prop" too? The current situation can be surprising: "$object->foo()" // $object->foo . '()' "$object->obj->bar" // $object->obj . '->bar' "$object->arr[qux]" // $object->arr . '[qux]' "$array[arr][bar]" // $array['arr'] . '[bar]' "$array[obj]->qux" // $array['obj'] . '->qux' In any case, I'm +1 for deprecating "$array[key]", and "$array[0]" to avoid introducing another inconsistency. -- Guilliam Xavier -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php