PHP 4.0 Bug #5061: false value are not 0
| From: | santini at dsi dot unimi dot it | Date: | Thu, 15 Jun 2000 14:41:34 +0000 |
| Subject: | PHP 4.0 Bug #5061: false value are not 0 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-21425@lists.php.net to get a copy of this message | ||
From: santini@dsi.unimi.it
Operating system: Linux
PHP version: 4.0.0 Release
PHP Bug Type: Scripting Engine problem
Bug description: false value are not 0
<?php print "A".( 0 == 1 )."B"; ?>
This one line scipt prints "AB" instead of "A0B" as in php 3.0.x
as if a false test returns an undefined value instead of a 0. This
can break a lot of scritps relying on the fact that true test should
have non-zero value and false one should be zero.