From: Operating system: Windows Xp SP3 PHP version: 5.3.3 Package: *Regular Expressions Bug Type: Bug Bug description:Division by zero when using % operator.
Description: ------------ Asume $f[1] = "" I get a "Division by zero" error when i do this: $overflowsimulation = (((strlen($f[1])) + 2147483648) % 4294967296); In fact, i get it even if i do this: $overflowsimulation = (2147483648 % 4294967296); Thanks. Test script: --------------- <?php $f = ""; $osim = (((strlen($f)) + 2147483648) % 4294967296); echo $osim; ?> Expected result: ---------------- 0 Actual result: -------------- Warning: Division by zero in C:\Archivos de programa\EasyPHP-5.3.2i\www\BASICtoPHP_testfile_60661.578.php on line 5 -- Edit bug report at http://bugs.php.net/bug.php?id=52566&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52566&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52566&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52566&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52566&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52566&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52566&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52566&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52566&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52566&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52566&r=support Expected behavior: http://bugs.php.net/fix.php?id=52566&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52566&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52566&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52566&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52566&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52566&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52566&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52566&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52566&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52566&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52566&r=mysqlcfg