php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9118 3.0.18 bug - if ("INF" == "INF") {} does not equal true
Submitted: 2001-02-05 13:31 UTC Modified: 2002-09-30 18:41 UTC
From: bcross at manlab dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.17 OS: Debian Linux
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: bcross at manlab dot com
New email:
PHP Version: OS:

 

 [2001-02-05 13:31 UTC] bcross at manlab dot com
I encountered a strange behaviour of comparing values.  I've only encountered it with a value of "INF". The following script should cause "INF" to be displayed in version 3.0.18 on Linux

<?php
	$arr =array( 
	"TEST",
	"INF"
	);
	$cnt = sizeof($arr);
	for ($x=0; $x < $cnt; $x++) {
		$item = $arr[$x];
		if ("$item" == "$item") {
		} else {
			print "$item<br>\n";
		}
	}
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-30 18:41 UTC] hholzgra@php.net
works in 4.2.3
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 03:01:35 2025 UTC