From: CaptSushekECF at aol dot com Operating system: Apache PHP version: 5.0.5 PHP Bug Type: Math related Bug description: Strange math when squaring
Description: ------------ I was running a benchmark script to test out certain things on my localhost. Once of my scripts involved performing randomly large math calculations within comments, increasing expotentially. Reproduce code: --------------- <?php $st = array_sum (explode (' ', microtime ())); ob_start (); for ($i = 1; $i < 10000; $i++) { echo "<!-- Hello, World! " . ($i % round(sqrt($i*2))) ^ $i . " -->\n"; } ob_end_flush (); echo round ((array_sum (explode (' ',microtime ())) - $st), 5) . "\n"; ?> Expected result: ---------------- I expected for the page to hesistate for a minute or so, and then print out the expected benchmark along with the comments and numbers within them. Actual result: -------------- Strange HTML/Chinese characters: (e.g., ᔍഘlᔍഛlᔍചlᔍകlᔍഔlᐍഝlᐍജlᐍടlᐍഞlᐍങlᐍഘlᐍഛlᐍചlᐍകlᐍഔlᜍഝlᜍജlᜍടlᜍഞlᜍങlᜍഘlᜍഛlᜍചlᜍകlᜍഔlᘍഝlᘍജlᘍടlᘍഞlᘍങlᘍഘlᘍഛlᘍചlᘍകlᘍഔlᤍഝlᤍജlᤍടlᤍഞlᤍങlᤍഘlᤍഛlᤍചlᤍകlᤍഔl᠍ഝ...) -- Edit bug report at http://bugs.php.net/?id=35321&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35321&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35321&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35321&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=35321&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35321&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35321&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35321&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35321&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35321&r=support Expected behavior: http://bugs.php.net/fix.php?id=35321&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35321&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35321&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35321&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35321&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35321&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35321&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35321&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35321&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35321&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35321&r=mysqlcfg