ID: 43577
Updated by: [EMAIL PROTECTED]
Reported By: lunter at interia dot pl
-Status: Open
+Status: Wont fix
Bug Type: Feature/Change Request
Operating System: all
PHP Version: 6CVS-2007-12-12 (CVS)
New Comment:
We discussed this already as well a few times, also not going to
happen.
Previous Comments:
------------------------------------------------------------------------
[2007-12-12 09:04:10] lunter at interia dot pl
Description:
------------
I would be nice if PHP 6.x can use operator [] with called function.
Reproduce code:
---------------
<?
function f(){
return(array('a','b'));
}
print(f()[0]);
?>
Expected result:
----------------
Like now:
<?
function f(){
return(array('a','b'));
}
$f=f();
print($f[0]);
unset($f);
?>
Actual result:
--------------
Parse error: syntax error, unexpected '['
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43577&edit=1