|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-07-25 10:51 UTC] 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 '['
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 22:00:01 2025 UTC |
For example: <? function f(){ return ( array('a','b','c') ); } print( f()[0] ); ?>