Re: simpler syntax for arrays
| From: | Jeff Griffiths | Date: | Thu, 18 Dec 2008 00:37:08 +0000 |
| Subject: | Re: simpler syntax for arrays | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42317@lists.php.net to get a copy of this message | ||
On 12/17/08 4:29 PM, jay wrote:
hi guys. i'm very new to your list so maybe something similar to my proposal has been already posted somewhere at this list but really i don't know how i can make the search. i often pass arrays to functions/methods this way: myfunc(array('key1'=>'val1', 'key2'=>'val2', ...)); it's really annoying to type in 'array' every time. i suggest using a simpler syntax: myfunc(['key1'=>'val1', 'key2'=>'val2', ...]); like in javascript. it'd be very nice to have this handy feature.This has been discussed as a potential feature for 5.3, but was discussed after no small amount of flames and acrimony. here is the relevant wiki page: http://wiki.php.net/rfc/shortsyntaxforarrays cheers, Jeff