RE: [PHP] quicker arrays as func args?
| From: | Michael Sims | Date: | Thu, 13 Jan 2005 16:20:08 +0000 |
| Subject: | RE: [PHP] quicker arrays as func args? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-206301@lists.php.net to get a copy of this message | ||
Justin French wrote:
> Pretty sure this can't be done, but thought I'd ask any way...
[...]
>
> foo("cat","dog",("a"=>"1","b"=>"2","c"=>"3"));
> or
>
> foo("cat","dog",{"a"=>"1","b"=>"2","c"=>"3"});
> would be nice (Ruby has
> something like this), but I'm guessing it's not possible.
No, can't do that. I'm used to stuff like that from Perl as well. It has been
brought up a few times on the internals list (check the archives for named
parameters or something like that) but has met with resistance so I doubt we'll see
something like this anytime soon.