Re: relaxing studlyCaps requirement?
| From: | Rasmus Lerdorf | Date: | Thu, 02 Aug 2001 17:38:23 +0000 |
| Subject: | Re: relaxing studlyCaps requirement? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1251@lists.php.net to get a copy of this message | ||
> > PHP itself has different conventions.
> >
> > (i.e. "natcasesort" and "array_walk")
>
> And is that a bug or a feature? FWIW, there is a standard that all new
> function names need to follow. The older ones are in for legacy reasons.
Not always. There are times when it is just convention that a function
has a certain name. strlen() for example would look odd as str_len() and
to be anally consistent foreach() should be for_each(). The fact that it
is a language construct isn't really relevant here if we were to decide to
blindly make everything in PHP consistent.
Also, all the image* functions which are currently named so there is a 1:1
match with the underlying image library would need to be renamed as would
all the bc* functions. For these, when the PHP extension really is a 1:1
clone of the underlying API extension and we refer people to the
documentation for this underlying API, it just causes confusion if the
functions don't match this underlying documentation.
And no, I don't think it should be str_len() and for_each().
-Rasmus