|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2009-10-26 18:52 UTC] melfar at gmail dot com
  [2009-10-26 18:52 UTC] melfar at gmail dot com
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 12:00:01 2025 UTC | 
Description: ------------ PHP parser doesn't allow for array index operation to be used on a result of a function call. I propose a patch to allow such a construction. Reproduce code: --------------- <?php function car_brands() { return array("chevy", "hummer"); } print car_brands()[1] . "\n"; ?> Expected result: ---------------- "hummer" Actual result: -------------- Parse error: syntax error, unexpected '[' in test.php on line 5