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
 [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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-30 18:41 UTC] hholzgra@php.net
works in 4.2.3
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 23:01:30 2024 UTC