|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-11-29 10:03 UTC] bugzilla33 at gmail dot com
Description:
------------
Array dereferencing support do not work.
Test script:
---------------
<?php
print(array('pass')[0]);
print(['pass'][0]);
?>
Expected result:
----------------
passpass
Actual result:
--------------
Parse error: syntax error, unexpected '[' in C:\htdocs\test.pl\1.php on line 2
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 11 02:00:01 2025 UTC |
<?php $i=0; print(array('pass')[$i]); print(['pass'][$i]); ?>