On 03/01/2010 11:35 PM, Stan Vassilev wrote:

Hi,

The gettype() documentation warns people that the returned string is "subject to change".
Why is there a function that's subject to change in the API?

Because life is complicated.
Because gettype("test") returns "string" in 5.x and "unicode" in 6.0.

What exactly are you trying to fix? And what exactly are you proposing?

If I have to propose anything, that'd be for 6.0 unicode strings to return "string" and binary strings to return "binary", as that is more apt for the real-world use cases people will find themselves in (and migrating code will be easier).

A PHP user stumbled onto the "subject to change" note and asked if it's safe to use. If differentiating both types of strings in 6.0 is what was intended, then it's perfectly safe to use, and I'll probably file an issue with docs to be more clear about the actual situation.

Regards,
Stan Vassilev

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to