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

 ID:          51281
 Updated by:  ahar...@php.net
 Reported by: olamedia at gmail dot com
 Summary:     Json-like alternative syntax for arrays
-Status:      Open
+Status:      Wont fix
 Type:        Feature/Change Request
 Package:     Arrays related
 PHP Version: 5.3.2

 New Comment:

Since you've already found the declined RFC that covered this, I'll
simply quote 

what I wrote in bug #50647:



If you really, really, really want to reopen that can of worms, take it
to the 

Internals mailing list. At best, you'll get a few suggestions to write a
fresh 

RFC for possible inclusion in PHP 6. More likely, you'll get pointed to
the same 

link you've already found.



If you do this, bear in mind that it's been discussed many times over
the years, 

and has been rejected each and every time. To whit, a possibly complete
list of 

previous mailing list discussions back to the start of 2007:



December 2008: http://marc.info/?l=php-internals&m=122956025230147&w=2



May 2008: http://marc.info/?l=php-internals&m=121142241913674&w=2



January 2008: http://marc.info/?l=php-internals&m=120000917517840&w=2
and 

http://marc.info/?l=php-internals&m=119995972028293&w=2



February 2007: http://marc.info/?l=php-internals&m=117057393530217&w=2



The (extremely lengthy) May 2008 discussion was the one that led to the
RFC.



In short, this is pretty much in the same boat as being able to directly


dereference array returned from functions, or ifsetor, or taint support,
or some 

of the other regularly requested features that don't spring to mind at
12:07 on 

a Tuesday morning: it comes up on a regular basis, and while you and I
may or 

may not agree with the decisions that have been made, they've been made,
and I 

don't know that anyone will thank you for reopening a debate that's been
had 

many times over.


Previous Comments:
------------------------------------------------------------------------
[2010-03-12 12:34:35] olamedia at gmail dot com

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());

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

Reply via email to