> De : Zeev Suraski [mailto:z...@zend.com]
>
> Thanks a lot for the input!  We'll reconsider accepting "1"/"0" as valid
> Booleans as the original proposal did.

Yes. Same conversion rules : empty string and "0" are false, all the rest is 
true.

For consistency reasons, we can extend the "0" case to accept leading zeroes 
and leading and trailing blanks, as for a numeric string.

Probably no need to go as far as common numeric string case, where "0.0" would 
be false too, but to be discussed. The rule may be more intuitive if we say 
'any numeric string that converts to a null number is considered as false'.

Just a detail.

Regards

François



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

Reply via email to