php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66672 echo ["a", "b"][0] should be allowed
Submitted: 2014-02-08 08:41 UTC Modified: 2014-02-08 08:53 UTC
From: aleemb at gmail dot com Assigned: requinix (profile)
Status: Closed Package: Arrays related
PHP Version: 5.4.25 OS: OS X
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: aleemb at gmail dot com
New email:
PHP Version: OS:

 

 [2014-02-08 08:41 UTC] aleemb at gmail dot com
Description:
------------
<?php assert(["a", "b"][0] == "a"); ?>

Test script:
---------------
<?php assert(["a", "b"][0] == "a"); ?>

Expected result:
----------------
true

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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-08 08:53 UTC] requinix@php.net
-Status: Open +Status: Closed -Type: Bug +Type: Feature/Change Request -Assigned To: +Assigned To: requinix
 [2014-02-08 08:53 UTC] requinix@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 08:00:02 2026 UTC