Bug #35321 [Com]: Strange math when squaring
Edit report at http://bugs.php.net/bug.php?id=35321&edit=1
ID: 35321
Comment by: jihoy at admin dot com
Reported by: CaptSushekECF at aol dot com
Summary: Strange math when squaring
Status: No Feedback
Type: Bug
Package: Math related
Operating System: Apache
PHP Version: 5.0.5
Block user comment: N
Private report: N
New Comment:
Yeah, the math is really strange but I believe you have worked it out!!
http://www.amerisleep.com
Previous Comments:
------------------------------------------------------------------------
[2005-11-30 01:00:09] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2005-11-22 03:12:45] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-11-22 01:58:26] CaptSushekECF at aol dot com
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 this bug report at http://bugs.php.net/bug.php?id=35321&edit=1
Thread (3 messages)