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
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: 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: Thu Jul 17 04:01:33 2025 UTC