At 01:40 AM 10/6/2001 +0200, [EMAIL PROTECTED] wrote:
>Can you trust on the compare functions to return either -1, 0 or 1? I don't
>think so... but since that assumption is made in various locations in PHP4,
>it maybe is true?

I think Zend's internal compare functions where normalized a while ago.


>Similar question for zend booleans, can you trust the lval to be either 0 or
>1, or not?

Yes, booleans should be 0 or 1.

All of this doesn't meant here aren't bugs someplace :) However, I think in 
general if you want to write a robust function which relies on these things 
you're best off relying on the 0 being false and all the rest being true.

Andi


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to