php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #34002 Additional array creation construct
Submitted: 2005-08-05 03:31 UTC Modified: 2005-08-05 09:10 UTC
From: syncops at hotmail dot com Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 5CVS-2005-08-05 (dev) OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
42 - 27 = ?
Subscribe to this entry?

 
 [2005-08-05 03:31 UTC] syncops at hotmail dot com
Description:
------------
I use associative arrays for so many things like  function/method parameters, database records, creating URL's and HTML tags.

I'm looking at tons of array creation code in my application because the only way to create an array is by using the array("key1"=>"value1", "key2"=>"value2") construct.

The following construct would be a very good addition and is also used in other (script)languages:
{"key1"=>"value1", "key2"=>"value2"}.

I sincerely hope there is some way to implemented this new construct. Thanks for reading this.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-05 09:10 UTC] derick@php.net
This was suggested about a year ago too, and we all thought that we should not add this behavior. You'll have to deal with array().
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 10:01:32 2024 UTC