Array dereferencing using alternative array syntax
| From: | Nikita Popov | Date: | Sun, 09 Oct 2011 17:14:54 +0000 |
| Subject: | Array dereferencing using alternative array syntax | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-55767@lists.php.net to get a copy of this message | ||
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?
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