ID: 42440 Updated by: [EMAIL PROTECTED] Reported By: romain dot tartiere at healthgrid dot org -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: GNU/Linux PHP Version: 5.2.3 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2007-08-27 10:00:01] romain dot tartiere at healthgrid dot org Description: ------------ When using a function that returns an array, the parser is not apple to correctly parse the expression and assign the n'th element to a variable Reproduce code: --------------- <?php function foo() { return array(1, 2, 3); } echo foo()[1]; # <<< ?> Expected result: ---------------- 2 (second element of the array) Actual result: -------------- Parse error: syntax error, unexpected '[', expecting ',' or ';' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42440&edit=1