ID:               42100
 Updated by:       [EMAIL PROTECTED]
 Reported By:      lunter at interia dot pl
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: WinXP
 PHP Version:      6CVS-2007-07-25 (CVS)
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Since feature has been requested before, maybe someday somebody has a
patch, I can't see this happen, soon.


Previous Comments:
------------------------------------------------------------------------

[2007-07-25 11:13:49] lunter at interia dot pl

For example:

<?
 function f(){
  return ( array('a','b','c') );
 }

 print( f()[0] );
?>

------------------------------------------------------------------------

[2007-07-25 10:51:48] lunter at interia dot pl

Description:
------------
Direct reference to arrays and strings, etc (like in JS, C#).

Reproduce code:
---------------
<?
 print( array('a','b','c')[0] );
 print( 'abc'[1] );
?>

Expected result:
----------------
printed: ab

Actual result:
--------------
Parse error: syntax error, unexpected '['


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42100&edit=1

Reply via email to