RE : [PHP-DEV] Re: Named parameters, was Re: Syntactic improvement to array

From: Date: Mon, 05 Feb 2007 13:38:14 +0000
Subject: RE : [PHP-DEV] Re: Named parameters, was Re: Syntactic improvement to array
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-27807@lists.php.net to get a copy of this message
> From: Christian Schneider [mailto:cschneid@cschneid.com] > >> Argh! Reading such a line, I think of named parameters, > not an array. > > That's exactly what we are emulating this way ;-) > Our patch is greedy, i.e. it collects as much as possible > into one array. If you want to do this you need an explicit > array() on the second set of parameters. That's magical, > non-obvious and evil but we tend to have one $p array for all > named parameters only, why would you want more than one > parameter here anyway? ;-) OK. I didn't understand that it was a way to pass a list of pseudo-named parameters. But, even if it adds 2 chars, in such a case, I still prefer: Convert(['foo' => $foo, 'bar' => $bar, ... ]); Regards Francois

« previous php.internals (#27807) next »