Req #43577 [Com]: operator []

From: Date: Sun, 02 Jan 2011 09:49:31 +0000
Subject: Req #43577 [Com]: operator []
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-157511@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=43577&edit=1

 ID:                 43577
 Comment by:         semtlenori at gmail dot com
 Reported by:        lunter at interia dot pl
 Summary:            operator []
 Status:             Wont fix
 Type:               Feature/Change Request
 Package:            Feature/Change Request
 Operating System:   all
 PHP Version:        6CVS-2007-12-12 (CVS)
 Block user comment: N
 Private report:     N

 New Comment:

to derick@php.net

Can you tell me where I can read the discussion? I am very interested in
this 
issue, but can't find any discussions.

Thanks in advance.


Previous Comments:
------------------------------------------------------------------------
[2007-12-12 09:31:29] derick@php.net

We discussed this already as well a few times, also not going to happen.

------------------------------------------------------------------------
[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/bug.php?id=43577&edit=1


Thread (3 messages)

« previous php.bugs (#157511) next »