php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14127 php4.06 for apache ,windows
Submitted: 2001-11-19 18:52 UTC Modified: 2001-11-20 01:13 UTC
From: xiaoyf at 21cn dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.6 OS: windows2000/nt4 server
Private report: No CVE-ID: None
 [2001-11-19 18:52 UTC] xiaoyf at 21cn dot com
I have  a program ,work with windows2000/nt4 server and apache 1.3.22,php4.0.6

if ("32060199990000780"=="32060199990000782") {
 echo "ok<br>";
 }
 else {
 echo "not <br>";
 }
it comp is ok.
this is error ! (0==2)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-20 01:13 UTC] derick@php.net
THis is not a bug, the strings get converted to a number here. Because the number is too big as integer value, they are converted into a floating point number. Floatingpoint numbers are never so accurate, thus the comparison succeeds. Please use the === operator instead of the == operator to get the desired result.

Derick
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 08:01:27 2025 UTC