php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60547 Comparing 9223372036854775807 and 9223372036854775809.2
Submitted: 2011-12-16 20:12 UTC Modified: 2011-12-16 20:45 UTC
From: krzysiekpia at gmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: Irrelevant OS: MAC OS X 10.6.8
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: krzysiekpia at gmail dot com
New email:
PHP Version: OS:

 

 [2011-12-16 20:12 UTC] krzysiekpia at gmail dot com
Description:
------------
var_dump(9223372036854775807 >= 9223372036854775809.2) evaluates true.

Test script:
---------------
var_dump(9223372036854775807 >= 9223372036854775809.2);


Expected result:
----------------
bool(false)

Actual result:
--------------
bool(true)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-16 20:45 UTC] cataphract@php.net
-Status: Open +Status: Bogus
 [2011-12-16 20:45 UTC] cataphract@php.net
This is because the comparison implies a conversion of the int operand to float and that conversion results in the same number. This is expected behavior.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 20:01:32 2025 UTC