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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 11:01:34 2024 UTC