ID: 45787 Updated by: [EMAIL PROTECTED] Reported By: icyliquid at gmail dot com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: All PHP Version: 5.2.6 New Comment:
This has been discussed in the past and was declined. See http://wiki.php.net/rfc/shortsyntaxforarrays for details. Previous Comments: ------------------------------------------------------------------------ [2008-08-11 14:50:01] icyliquid at gmail dot com Description: ------------ After a year of heavy Javascript coding, my return to PHP has been marked with mixed feelings. One thing bothering me is (what seems to me to be) the cumbersome array syntax of PHP. Javascript has: var arr = [ 'foo', 'bar', 'baz' ... ]; Obviously, PHP supports associative arrays and Javascript coders have to resort their language's Object class for achieve that, so perhaps the JS object syntax works better here: var obj = { 'key':'value', 'otherkey':'otherval' ... }; I have found myself passing arrays to methods on an increasingly frequent basis, and I think that a concise syntax like this would go a long way to increasing readability. What do you guys think? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45787&edit=1