Re: PHP 4.0 Bug #5061: false value are not 0
| From: | Paul DuBois | Date: | Thu, 15 Jun 2000 18:03:33 +0000 |
| Subject: | Re: PHP 4.0 Bug #5061: false value are not 0 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-21449@lists.php.net to get a copy of this message | ||
At 2:41 PM +0000 2000-06-15, santini@dsi.unimi.it wrote:
Why are they making that assumption? <?php print "A".( 0 == 1 ? "0" : "1")."B"; ?> -- Paul DuBois, paul@snake.netFrom: santini@dsi.unimi.itOperating system: LinuxPHP version: 4.0.0 Release PHP Bug Type: Scripting Engine problemBug 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.