Re: Re: PHP 4.0 Bug #4805 Updated: !1 could return 0 instead of false
| From: | Zeev Suraski | Date: | Mon, 05 Jun 2000 05:50:52 +0000 |
| Subject: | Re: Re: PHP 4.0 Bug #4805 Updated: !1 could return 0 instead of false | ||
| References: | 1 2 3 4 5 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-20227@lists.php.net to get a copy of this message | ||
At 01:46 05/06/2000, Michal Vitecek wrote:
maybe the whole lot of problems wouldn't have happened if the boolean value wasn't introduced to php at all. having boolean in php makes php as a language less consistent in my opinion: 'echo true' prints 1, whereas 'echo false' doesn't print anything, 2 != true is 1/true in php3 but 0/false in php4 etc. i don't know but have all the cons and pros of having boolean in php language been considered?There are no real drawbacks to having the boolean type in PHP other than a (relatively) minor downwards incompatibility. Since overall it makes sense, our general approach in PHP 4.0 was to prefer functionality to downwards compatibility in cases like this (which would only affect a small group of people). Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/