php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3573 Comparison of string "inf" fails
Submitted: 2000-02-22 14:28 UTC Modified: 2000-02-25 23:10 UTC
From: stefan at fostam dot franken dot de Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Beta 3 OS: RedHat Linux 6.0 Intel
Private report: No CVE-ID: None
 [2000-02-22 14:28 UTC] stefan at fostam dot franken dot de
I found this misbehaviour in several versions (3.0.12, 4b1 through 4b4):

if ("inf" == "inf") {
  print "OK";
}

if ("inf" != "inf") {
  print "BUG";
}

Comparing the string "inf" with itself (either literal or by variables) returns false,
and vice versa comparing with "!=" true. So far, "inf" is the only string with that
misbehaviour I've detected.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-02-25 23:10 UTC] zeev at cvs dot php dot net
Fixed
 [2000-02-25 23:10 UTC] zeev at cvs dot php dot net
Fixed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 17:01:34 2024 UTC