PHP 4.0 Bug #3686: Comparison of two strings containing 'nan' returns not equal.
| From: | bpatrick at bwibooks dot com | Date: | Wed, 01 Mar 2000 13:28:24 +0000 |
| Subject: | PHP 4.0 Bug #3686: Comparison of two strings containing 'nan' returns not equal. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-16204@lists.php.net to get a copy of this message | ||
From: bpatrick@bwibooks.com
Operating system: linux 2.2.5-15
PHP version: 4.0 Beta 4 Patch Level 1
PHP Bug Type: Misbehaving function
Bug description: Comparison of two strings containing 'nan' returns not equal.
Script:
<?
$r='nan';
$s='nan';
if ($r != $s)
echo "This is weird!";
?>
./configure --enable-track-vars --disable-debug --with-pgsql
I don't use a php.ini file
This problem is not confined to this release level. After discovering this problem I tried it on
your other two betas and the last release before that with the same result. Any other string seems
to work, just not 'nan'. The problem does not exist on another computer running the same
php and postgres but using linux 2.0.36. The problem occurs in the apache module and the cgi. I
have checked that the strlen of both is 3, I have compared each byte like $r[0]==$s[0] and that
works, but comparing the two strings always fails! The computer is a Dell Poweredge 2300 with a 500
mhz Pentium II processor.