From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.2.1 PHP Bug Type: Scripting Engine problem Bug description: Strange behaviour with the string 'inf'
Very strange bug: (double) of any string begining with 'inf' evaluates as 'INF', but only in strings of more than 3 characters a comparison with a integer results in same bug. Try this script: <? echo 'somestring' > 1 ? 1 : 0, '<br>'; echo 'inf' > 1 ? 1 : 0, '<br>'; echo 'info' > 1 ? 1 : 0, '<br>'; echo 'inf at begin' > 1 ? 1 : 0, '<br>'; echo (double)'somestring', '<br>'; echo (double)'inf', '<br>'; echo (double)'inf at begin', '<br>'; ?> Expected results are: 0 0 0 0 0 0 0 But real results are: 0 0 1 1 0 INF INF Saludos Àngel -- Edit bug report at http://bugs.php.net/?id=22173&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22173&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22173&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22173&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22173&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22173&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22173&r=support Expected behavior: http://bugs.php.net/fix.php?id=22173&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22173&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22173&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22173&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22173&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22173&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22173&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22173&r=gnused