#50647 [WFx]: Short array notation
| From: | robert_xp at gmx dot net | Date: | Mon, 04 Jan 2010 15:32:42 +0000 |
| Subject: | #50647 [WFx]: Short array notation | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146323@lists.php.net to get a copy of this message | ||
ID: 50647
User updated by: robert_xp at gmx dot net
Reported By: robert_xp at gmx dot net
Status: Wont fix
Bug Type: Feature/Change Request
PHP Version: 5.3.1
New Comment:
Grml...Sorry, I didn't saw this before. I read the mailing lists, but I
couldn't find a justification why this feature is declined. Most
userspace votes were positive, and I added this feature independent from
these discussions - maybe open another vote with more parts?
Previous Comments:
------------------------------------------------------------------------
[2010-01-04 12:27:25] aharvey@php.net
This has already gone through the RFC process and been declined, per
http://wiki.php.net/rfc/shortsyntaxforarrays
------------------------------------------------------------------------
[2010-01-04 11:46:29] robert_xp at gmx dot net
Description:
------------
A nice improvement for PHP would be a short hand notation for arrays.
You can find more details here: http://www.xarg.org/2009/12/php-hacking/
Reproduce code:
---------------
//old:
$arr = array(1, 2, array(5 => "foo", 3.14159), 9);
//new:
$arr = [1, 2, [5 => "foo", 3.14159], 9];
Expected result:
----------------
In both cases the result of $arr should be the same.
Actual result:
--------------
Compile-error
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50647&edit=1