From: robert_xp at gmx dot net Operating system: PHP version: 5.3.1 PHP Bug Type: Feature/Change Request Bug description: Short array notation
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 bug report at http://bugs.php.net/?id=50647&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50647&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50647&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50647&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50647&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50647&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50647&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50647&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50647&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50647&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50647&r=support Expected behavior: http://bugs.php.net/fix.php?id=50647&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50647&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50647&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50647&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50647&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50647&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50647&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50647&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50647&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50647&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50647&r=mysqlcfg
