simpler syntax for arrays

From: Date: Thu, 18 Dec 2008 00:29:41 +0000
Subject: simpler syntax for arrays
Groups: php.internals 
Request: Send a blank email to internals+get-42316@lists.php.net to get a copy of this message
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. regards, jay

« previous php.internals (#42316) next »