Edit report at https://bugs.php.net/bug.php?id=60405&edit=1

 ID:                 60405
 User updated by:    bugzilla33 at gmail dot com
 Reported by:        bugzilla33 at gmail dot com
 Summary:            Array dereferencing support do not work
 Status:             Open
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   All
 PHP Version:        5.4.0RC2
 Block user comment: N
 Private report:     N

 New Comment:

<?php

 $i=0;

 print(array('pass')[$i]);

 print(['pass'][$i]);

?>


Previous Comments:
------------------------------------------------------------------------
[2011-11-29 10:30:24] bugzilla33 at gmail dot com

Package: Compile failure -> Scripting Engine problem

------------------------------------------------------------------------
[2011-11-29 10:03:55] 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


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



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

Reply via email to