ID: 34563 Updated by: [EMAIL PROTECTED] Reported By: colin at breame dot net -Status: Open +Status: Bogus -Bug Type: Compile Failure +Bug Type: Scripting Engine problem PHP Version: 5.0.5 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: ------------------------------------------------------------------------ [2005-09-20 14:20:15] colin at breame dot net Description: ------------ When using an indexer on a return value of a function, the compiler returns an error: parse error, unexpected '[' I would expect it to compile as it would be a valid expression. Reproduce code: --------------- Does not compile: <?php print test()['test']; function test() { return array('test'=>1); } ?> Does compile: <?php $tmp = test(); print $tmp['test']; function test() { return array('test'=>1); } ?> Expected result: ---------------- Actual result: -------------- PHP Parse error: parse error, unexpected '[' in test.php on line 2 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34563&edit=1
