From: phplists at stanvassilev dot com Operating system: Linux, BSD, possibly all *nix PHP version: 5.2.9 PHP Bug Type: Math related Bug description: NaN > NaN, NaN > 0, NaN < 0 return true
Description: ------------ Tested on Gentoo, CentOS, OSX. This is possibly NOT related to the Windows NaN bug, as Windows is NOT affected by this issue. However, please test if any fix doesn't cause regression on Windows. NaN > NaN, NaN > 0, NaN < 0 return true, while they should return false in all cases (any comparison where either side is NaN, should return false). Reproduce code: --------------- $NaN = sqrt(-1); var_dump($NaN > $NaN); var_dump($NaN > 0); var_dump($NaN < 0); Expected result: ---------------- float(NAN) bool(false) bool(false) bool(false) Actual result: -------------- float(NAN) bool(true) bool(true) bool(true) -- Edit bug report at http://bugs.php.net/?id=48418&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48418&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48418&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48418&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48418&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48418&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48418&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48418&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48418&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48418&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48418&r=support Expected behavior: http://bugs.php.net/fix.php?id=48418&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48418&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48418&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48418&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48418&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48418&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48418&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48418&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48418&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48418&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48418&r=mysqlcfg