Re: array_change_key_case()? key_exists()?
| From: | Derick Rethans | Date: | Sun, 11 Nov 2001 19:44:57 +0000 |
| Subject: | Re: array_change_key_case()? key_exists()? | ||
| References: | 1 | Groups: | php.dev php.doc |
| Request: | Send a blank email to php-dev+get-70158@lists.php.net to get a copy of this message | ||
Hello,
I won't touch PHP unless your CVS account is revoked.
Derick
On Sun, 11 Nov 2001, Jeroen van Wolffelaar wrote:
> On Sun, 11 Nov 2001, Derick Rethans wrote:
>
> > On Sun, 11 Nov 2001, Egon Schmid wrote:
> >
> > > Please revert that patch from Jeroen. I have something about
> > > undocumented functions.
> >
> > done with pleasure.
>
> The reason for (temporarily at least) commenting them was to prevent
> users from learning from that function without a proper discussion
> wether they really belong in PHP. Once they are documented, there's just
> another BC problem created. So please do not revert it until properly
> discussed. I didn't have the chance to respond to various arguments yet.
>
> Egon and Goba: this is just while the discussion is going on, if it's
> decided that they should stay as it is now, you can uncomment it again
> tomorrow - what does a day make on a function not being documented for
> months?
>
> Okay, to the discussion itself:
>
> (array_)key_exists: As Andi said, there is a reason why isset behaves
> like it behaves now. IMO, I see two possibilities:
> (a): if that reason isn't valid anymore, let's fix isset in stead of
> adding another function
> (b): if it IS valid, then why would key_exists be useful and good, IMO
> key_exists should follow isset(), rendering it superflueous.
>
> array_change_key_case:
>
> Well... there be performance issues, but no matter what, a more
> general-use function should be created - if one. For example a
> array_walk like function which applies a random function to each key.
> (doesn't array_walk already support this?)
>
> So I'm still quite against array_change_key_case, for array_key_exists
> there might be good arguments in favor, I didn't yet read them, but
> even.
>
> I recommented those functions just to prevent a "It's in the manual now,
> you cannot revert it, because of BC" closing of this discussion which is
> definitely something undesireable.
>
> --Jeroen
>
>
> Jeroen van Wolffelaar
> Jeroen@A-Eskwadraat.nl
> http://www.A-Eskwadraat.nl/~jeroen
>
Derick Rethans
---------------------------------------------------------------------
PHP: Scripting the Web - www.php.net - derick@php.net
SRM: Site Resource Manager - www.vl-srm.net
---------------------------------------------------------------------
JDI Media Solutions - www.jdimedia.nl - d.rethans@jdimedia.nl
Boulevard Heuvelink 102 - 6828 KT Arnhem - The Netherlands
---------------------------------------------------------------------