Re: [PHP-DEV] Scary note for gettype() in docs

2010-03-02 Thread Stan Vassilev
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.

Re: [PHP-DEV] Scary note for gettype() in docs

2010-03-02 Thread Derick Rethans
On Tue, 2 Mar 2010, Victor Bolshov wrote: From the user point of view it might seem that 5.x string and 6.x unicode are all strings, whatever you call them. Still, I am sure there _is_ a background for the decision to distinguish between string and unicode. Yes, there *has* to be a

Re: [PHP-DEV] Scary note for gettype() in docs

2010-03-02 Thread Richard Quadling
On 2 March 2010 10:25, Derick Rethans der...@php.net wrote: On Tue, 2 Mar 2010, Victor Bolshov wrote: From the user point of view it might seem that 5.x string and 6.x unicode are all strings, whatever you call them. Still, I am sure there _is_ a background for the decision to distinguish

[PHP-DEV] Scary note for gettype() in docs

2010-03-01 Thread Stan Vassilev
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? And just to clarify: I agree is_*() is better if we test for a certain type (as the note says). However, the use scenario for gettype() is

Re: [PHP-DEV] Scary note for gettype() in docs

2010-03-01 Thread Markus Fischer
On 01.03.2010 21:35, Stan Vassilev wrote: 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? Probably because of the unicode stuff, might suddenly return unicode (still true? don't know) or binary

Re: [PHP-DEV] Scary note for gettype() in docs

2010-03-01 Thread Antony Dovgal
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

Re: [PHP-DEV] Scary note for gettype() in docs

2010-03-01 Thread Victor Bolshov
From the user point of view it might seem that 5.x string and 6.x unicode are all strings, whatever you call them. Still, I am sure there _is_ a background for the decision to distinguish between string and unicode. 2 марта 2010 г. 1:27 пользователь Antony Dovgal t...@daylessday.org написал: On