Re: [PATCH] array_fill: Allow an array to specify keys
| From: | Matt W | Date: | Wed, 12 Jul 2006 01:00:19 +0000 |
| Subject: | Re: [PATCH] array_fill: Allow an array to specify keys | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-24351@lists.php.net to get a copy of this message | ||
Hi Andi,
Thanks for the reply. Yeah, array_fill_keys() may well make more sense. :-)
I had thought about that originally, and thought I came up with a reason to
just extend array_fill(), but I can't remember the reasoning now... (Maybe I
wasn't sure if you'd want another function.)
After your message, I think I'll proceed with array_fill_keys unless I hear
otherwise. OK? And make tests for it and array_fill (since there are none
now) and submit a new patch with everything ASAP.
Thanks,
Matt
----- Original Message -----
From: "Andi Gutmans" <andi@zend.com>
To: "'Matt W'" <php_lists@realplain.com>; <internals@lists.php.net>
Sent: Tuesday, July 11, 2006 4:42 PM
Subject: RE: [PHP-DEV] [PATCH] array_fill: Allow an array to specify keys
> I don't have a problem with the functionality and the patch doesn't seem
> problematic.
> I do question though whether we want to add this to array_fill()? Not sure
> if that parameter overloading is very intuitive as it doesn't just add one
> parameter. What do others think? Would you prefer an array_fill_keys()?
>
> Andi