From: Operating system: Archlinux PHP version: 5.3.3 Package: Unknown/Other Function Bug Type: Bug Bug description:IF Statement Long String
Description: ------------ I was testing long strings of numbers against an IF statement (see test) script and it was outputting information which was not true. Test script: --------------- This works: $o = 33; if ($o >= 29 && $o <= 32) { echo "true"; } else { echo "false"; } This does not work: $o = 336571324099282374385465584513479344133; if ($o >= 336571324099282374385465584513479344129 && $o <= 336571324099282374385465584513479344132) { echo "true"; } else { echo "false"; } Expected result: ---------------- In the working example, the output should be false. This is working as expected. In the non-working example, the output should be false. However, it is returning true. -- Edit bug report at http://bugs.php.net/bug.php?id=53204&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53204&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53204&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53204&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53204&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53204&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53204&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53204&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53204&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53204&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53204&r=support Expected behavior: http://bugs.php.net/fix.php?id=53204&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53204&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53204&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53204&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53204&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53204&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53204&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53204&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53204&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53204&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53204&r=mysqlcfg