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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: stefan at fostam dot franken dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 02:01:32 2025 UTC