From: arnaud at wixiweb dot fr Operating system: Linux / Windows PHP version: 5.4.5 Package: Scripting Engine problem Bug Type: Bug Bug description:fmod() and "modulo" operator do not work are not consistent with big int.
Description: ------------ fmod() and "modulo" operator do not work are not consistent with big int. Moreover, the results change between windows(PHP5.4) to linux(PHP5.3) See the test script for more informations Test script: --------------- // On Windows64 with PHP 5.4 // Example 1 var_dump(fmod(12345678901234567, 62)); // float(52) var_dump(12345678901234567 % 62); // int(20) // Example 2 var_dump(fmod(9999999999999999111, 62)); // float(18) var_dump(9999999999999999111 % 62); // int(0) // On Linux64 with PHP 5.3 // Example 3 var_dump(fmod(12345678901234567, 62)); // float(52) var_dump(12345678901234567 % 62); // int(51) // Example 4 var_dump(fmod(9999999999999999111, 62)); // float(18) var_dump(9999999999999999111 % 62); // int(-60) -- Edit bug report at https://bugs.php.net/bug.php?id=62729&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62729&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62729&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62729&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62729&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62729&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62729&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62729&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62729&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62729&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62729&r=support Expected behavior: https://bugs.php.net/fix.php?id=62729&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62729&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62729&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62729&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62729&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=62729&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62729&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62729&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62729&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62729&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62729&r=mysqlcfg