PHP 4.0 Bug #4865: Problem with != and 0

From: Date: Wed, 07 Jun 2000 12:43:40 +0000
Subject: PHP 4.0 Bug #4865: Problem with != and 0
Groups: php.dev 
Request: Send a blank email to php-dev+get-20457@lists.php.net to get a copy of this message
From: lwillis@plus.net.uk Operating system: Linux 2.2.14 PHP version: 4.0.0 Release PHP Bug Type: Other Bug description: Problem with != and 0 The following script produces unexpected results: <? $tmp = 0; if ($tmp != "JBIJI") { echo "is true"; } else { echo "is false"; } ?> This produces "is false" as output where I would have thought that since the value of $tmp isn't "JBIJI" the expression "$tmp != 'JBIJI'" should evaluate true??

« previous php.dev (#20457) next »