Bug #51672 [Nab->Csd]: Parse error when a subscript operator is used after a function call operator

From: Date: Mon, 05 Mar 2012 09:07:40 +0000
Subject: Bug #51672 [Nab->Csd]: Parse error when a subscript operator is used after a function call operator
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-168133@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=51672&edit=1 ID: 51672 Updated by: stas@php.net Reported by: miklcct at gmail dot com Summary: Parse error when a subscript operator is used after a function call operator -Status: Not a bug +Status: Closed Type: Bug Package: Compile Failure Operating System: Ubuntu 9.04 PHP Version: 5.3.2 -Assigned To: +Assigned To: stas Block user comment: N Private report: N New Comment: Thank you for your bug report. This issue has already been fixed in the latest released version of PHP, which you can download at http://www.php.net/downloads.php This syntax is now part of PHP 5.4. Previous Comments: ------------------------------------------------------------------------ [2011-08-26 09:56:49] nmn at mailinator dot com Not a bug, just a stupid feature that demonstrate the lack of vision in the language design. ------------------------------------------------------------------------ [2010-04-27 12:14:50] degeberg@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. ------------------------------------------------------------------------ [2010-04-27 12:11:21] miklcct at gmail dot com Description: ------------ syntax error when a subscript operator is used with a function call operator Test script: --------------- #!/usr/bin/php <?php function test() { return "foo"; } echo test()[0]; Expected result: ---------------- f Actual result: -------------- Parse error: syntax error, unexpected '[', expecting ',' or ';' in /home/www/bus/test.php on line 8 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=51672&edit=1

« previous php.bugs (#168133) next »