Re: [PHP-DEV] simpler syntax for arrays

2008-12-18 Thread Christian Schneider
Jay I. wrote: > interesting idea, thanks. but unfortunately it won't help me as i really > need to pass arrays as a single argument like this: > > my_func($param_1,$param_2,array(...)); You can do that. All parameters in a row with => will be merged to one array. You could call myfunc($a

Re: [PHP-DEV] simpler syntax for arrays

2008-12-18 Thread Jay I.
interesting idea, thanks. but unfortunately it won't help me as i really need to pass arrays as a single argument like this: my_func($param_1,$param_2,array(...)); i'm unaware of how to make patches for php so i wonder is it possible to add a dollar sign shortcut for array keyword. like this: my

Re: [PHP-DEV] simpler syntax for arrays

2008-12-18 Thread Christian Schneider
jay wrote: > okey. another syntax: > myfunc($('key1'=>'val1', 'key2'=>'val2', ...)); This has been discussed and rejected several times. If you still want to be able to use this syntax you can use my patch at http://cschneid.com/php/ including a script to convert from and to this syntax.

Re: [PHP-DEV] simpler syntax for arrays

2008-12-17 Thread jay
On Thu, 2008-12-18 at 02:26 +0100, Lars Strojny wrote: > Hi Jay, > > Am Donnerstag, den 18.12.2008, 03:18 +0200 schrieb jay: > [...] > > okey. another syntax: > > > > myfunc($('key1'=>'val1', 'key2'=>'val2', ...)); > > > > this can be implemented just as a shortcut for the array keyword. i > > t

Re: [PHP-DEV] simpler syntax for arrays

2008-12-17 Thread Lars Strojny
Hi Jay, Am Donnerstag, den 18.12.2008, 03:18 +0200 schrieb jay: [...] > okey. another syntax: > > myfunc($('key1'=>'val1', 'key2'=>'val2', ...)); > > this can be implemented just as a shortcut for the array keyword. i > think it won't be very hard to extend syntax for the dollar sign. > > my id

Re: [PHP-DEV] simpler syntax for arrays

2008-12-17 Thread jay
On Wed, 2008-12-17 at 16:37 -0800, Jeff Griffiths wrote: > 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 arra

Re: [PHP-DEV] simpler syntax for arrays

2008-12-17 Thread Jeff Griffiths
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'=>'

[PHP-DEV] simpler syntax for arrays

2008-12-17 Thread jay
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 annoyin