Re: PHP global namespace clogged up
From: Daniel Tryba (news_comp.lang.php_at_canopus.nl)
Date: 09/02/04
- Next message: Justin Koivisto: "Re: OT: gmail invites"
- Previous message: CJ Llewellyn: "Re: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource"
- In reply to: Tony Marston: "Re: PHP global namespace clogged up"
- Next in thread: Terence: "Re: PHP global namespace clogged up"
- Reply: Terence: "Re: PHP global namespace clogged up"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 2 Sep 2004 12:58:38 +0000 (UTC)
Tony Marston <tony@nospam.demon.co.uk> wrote:
>>> I have groundbreaking news for all you geeks - PHP is not the same as
>>> language X because IT IS DIFFERENT. If it was the same then there would
>>> be
>>> no point. Different languages are different, so get used to the
>>> differences
>>> and STOP COMPLAINING.
>>
>> I'm pointing out a serious problem with PHP.
>
> If PHP had serious problems it would not be the popular language it is
> today. If any problems exist at all they are in your head.
While PHP doens't need a namespace, its functions are a _mess_
Examples:
-str_split() vs parse_str()
The latter obviously should be str_parse()
-str* vs. str_*
Lets make up our minds an use uniform function names please.
-strchr() is an alias for strstr(), strrchr() is not an alias for
strrstr() (which doesn't even exist).
-string strchr(string haystack, string needle)
shouldn't that be char needle?
-strpos vs strrpos
int strpos(string haystack, string needel [,int offset]):
this function can take a full string as the needle parameter and the
entire string will be used.
int strrpos ( string haystack, string needle [, int offset]):
If a string is passed as the needle, then only the first character
of that string will be used
So strrpos not only works differently, it's prototype should be
int strrpos ( string haystack, char needle [, int offset])
All exmaples above use the haystack-needle form, others use
needle-haystack order (like array_key_exists).
It appears you are blind to these faults or are just used to it! Maybe
you are using some piece of software to correct there errors for you?
-- Daniel Tryba
- Next message: Justin Koivisto: "Re: OT: gmail invites"
- Previous message: CJ Llewellyn: "Re: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource"
- In reply to: Tony Marston: "Re: PHP global namespace clogged up"
- Next in thread: Terence: "Re: PHP global namespace clogged up"
- Reply: Terence: "Re: PHP global namespace clogged up"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|