php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3686 Comparison of two strings containing 'nan' returns not equal.
Submitted: 2000-03-01 08:28 UTC Modified: 2000-03-01 09:07 UTC
From: bpatrick at bwibooks dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Beta 4 Patch Level 1 OS: linux 2.2.5-15
Private report: No CVE-ID: None
 [2000-03-01 08:28 UTC] bpatrick at bwibooks dot com
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. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-03-01 09:07 UTC] thies at cvs dot php dot net
fixed in cvs - please update your Zend CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 18:01:36 2024 UTC