Hi Nikita, On 9 October 2011 18:14, Nikita Popov <nikita....@googlemail.com> wrote: > Hi list! > > PHP 5.4 added array dereferencing support (e.g. `func()[1]`), but the > grammar seems to lack support for dereferencing using the alternative > array access syntax (e.g. `func(){1}`). Was this done on purpose or > was it just forgotten?
I remember mentioning this on the list a while back, but didn't get any further comment (it was an aside to a related thread). I'd like to see the curly brace alternative added, if only to be consistent with the existing syntax to access array/string values that can be used elsewhere. > > Some links: > > http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_parser.y#array_function_dereference > http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_parser.y#array_method_dereference > http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_parser.y#reference_variable > (example of grammar with alternative syntax) > > Nikita > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php