ID: 50745 Updated by: j...@php.net Reported By: alvaro at demogracia dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows PHP Version: 5.3.2RC1 New Comment:
This is because there was bug in handling INF (and NaN) in Windows prior to 5.3.1 which was fixed. And yes, that's the _expected_ result too. You can't compare infinity to infinity. Previous Comments: ------------------------------------------------------------------------ [2010-01-14 08:33:54] alvaro at demogracia dot com Description: ------------ The INF==INF comparison evals to FALSE in 5.3.1 and 5.3.2RC1 Windows releases. It used to be TRUE in previous versions including 5.3.0 and 5.2.11. I've tested it in Windows XP and Windows Server 2008. It's also FALSE in 5.2.10 under Red Hat Enterprise Linux 5. The strict comparison INF===INF evals to TRUE in all cases. Please note I'm referring to the INF numeric constant, not an 'INF' string. Reproduce code: --------------- <?php var_dump(INF==INF); ?> Expected result: ---------------- bool(true) Actual result: -------------- bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50745&edit=1