Req #51281 [Com]: Json-like alternative syntax for arrays
| From: | olamedia at gmail dot com | Date: | Fri, 12 Mar 2010 11:34:35 +0000 |
| Subject: | Req #51281 [Com]: Json-like alternative syntax for arrays | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-148559@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51281&edit=1
ID: 51281
Comment by: olamedia at gmail dot com
Reported by: olamedia at gmail dot com
Summary: Json-like alternative syntax for arrays
Status: Open
Type: Feature/Change Request
Package: Arrays related
PHP Version: 5.3.2
New Comment:
Found in wiki a declined patch:
http://wiki.php.net/rfc/shortsyntaxforarrays
But I really want
$a = [[],[],[],[],[]]
instead of
$a = array(array(),array(),array(),array(),array());
Previous Comments:
------------------------------------------------------------------------
[2010-03-12 09:31:56] olamedia at gmail dot com
Changing package
------------------------------------------------------------------------
[2010-03-12 09:18:17] olamedia at gmail dot com
Description:
------------
Json-like alternative syntax for arrays feature request.
It's much shorter, and don't have conflicts with current tokens.
Test script:
---------------
$a = [1,2];
$a = ['a':1,'b':2];
$a = array('a':1,'b':2);
$a = array('a'=>1,'b'=>2);
$a = ['a'=>1,'b'=>2];
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51281&edit=1