Re: Re: array_change_key_case()? key_exists()?

From: Date: Sun, 11 Nov 2001 19:50:42 +0000
Subject: Re: Re: array_change_key_case()? key_exists()?
References: 1  Groups: php.dev php.doc 
Request: Send a blank email to php-dev+get-70161@lists.php.net to get a copy of this message
From: "Jeroen van Wolffelaar" <jeroen@A-Eskwadraat.nl> > 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? It is complete nonsense. Gabor have discussed it with Andrei. Derick have reverted it and you have removed it with comments again. You can have a full time job if you want all undocumented functions documented. It should be easy, but not every developer follows some rules. > 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 > >

« previous php.dev (#70161) next »