Re: Re: mbstring
| From: | derick@php.net | Date: | Tue, 03 Sep 2002 08:38:47 +0000 |
| Subject: | Re: Re: mbstring | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-87856@lists.php.net to get a copy of this message | ||
On Tue, 3 Sep 2002, Zeev Suraski wrote:
> At 11:20 03/09/2002, derick@php.net wrote:
> >strlen -> stringlength... I think this should count the number of
> >characters in a string, not the binary length. It would be nice if this
> >function (strlen) would be transparent with mb things too, as no code
> >needs to be changed then.
>
> Compatibility is king. strlen() returns the number of bytes, has been for
> at least 5 years. You just can't change that because the name is slightly
> better or slightly worse.
Simply stating "Compability is king." doesn't do it for. And just saying
that it "has been like that for at least 5 years" doesn't mean it can
not change. It won't break BC at all (not even for the mbstring users,
as the mb_strlen() overloads the 'normal' strlen(). Heck, it will even
break BC for those users! Also, from the docs (and that is all what
should matter to users):
strlen
(PHP 3, PHP 4 )
strlen -- Get string length
Where can I find that it returns the number of bytes?
Derick