Re: [PHP-DOC] array_change_key_case()? key_exists()? From: Gabor Hojtsy (goba <email protected>)
Date: 11/11/01

> > goba Sun Nov 11 06:02:32 2001 EDT
> >
> > Modified files:
> > /phpdoc/en/functions array.xml
> > Log:
> > Documenting two functions:
> >
> > array_change_key_case
> > key_exists

I just went through the undocumented function list and
would like to add something useful. These seemed to be
ones probably good to be in the docs, and I can document
them without any developer help :)

I think I am not in the place to make decisions about
whether these functions should exists or not. As I have
seen they are in the source, and they are undocumented,
I have started to work on them.

> key_exists: it should be named array_key_exists first, and second,
> isset($a[key]) simply works fine. A -1 on that one. (I know, and I also
read
> in the archives, about the value-being-NULL issue, but still I don't think
> key_exists should exist.

Key_exists also works on objects. Maybe this is why it is named
key_exists. Yes, it seems the same as isset($array[$key]),
but I thought that guys must be doing something right there,
so maybe it is more relevant for these things... The reason I
have added this in arary.xml is that it is in array.c, but it
is wriiten in a way, that it works fine with objects as well,
so I played with it for some minutes to put in in var.xml
instead... I also added an isset() pointer, so people can find
another way of doing things..

> And array_change_key_case... why?? If going this way, I can think of
another
> million function that might remotely be useful... -1 on that one too.
>
> I'm commenting them out of the documentation for now, to prevent users
from
> learning from these functions until this has been discussed. key_exists is
> in 4.0.6, but array_change_key_case isn't in a released version.

OK, I have seen that this is there for a month now in the code,
so I thought it hurts noone... If it is not appropriate, please
remove it from the source and documentation after discussion.

I just wanted to make better statistics for undocumented
functions, and tried to document some basic ones.

Goba