Re: [PHP-I18N] is_string()

[email protected] (Andrei Zmievski)
Newsgroups php.i18n
Message-ID <[email protected]>
> I find that confusing too. Given the commit log, it is even more
> confusing:
>
> - Updated is_string():
>    If Unicode semantics is turned on, return "true" for Unicode  
> strings
>    only. If Unicode semantics is turned off, return "true" for native
>    strings only.
>
> It makes is_string basically useless, I can imagine two solutions:
>
> - keep it and always returns true (unicode and binary strings are
>   strings anyway)

You have a good point here. is_string() should treat both types as  
"string" type.

> - deprecate it in php 6.0, it will still returns true. At least
>   people will know that they should use the new functions

Ideally we'd have is_text() that would return true for both and  
deprecate is_string(), but that seems like a big change for not a  
whole lot of pay-off.

-Andrei
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.