php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35321 Strange math when squaring
Submitted: 2005-11-22 01:58 UTC Modified: 2005-11-30 01:00 UTC
Votes:3
Avg. Score:3.7 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: CaptSushekECF at aol dot com Assigned:
Status: No Feedback Package: Math related
PHP Version: 5.0.5 OS: Apache
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: CaptSushekECF at aol dot com
New email:
PHP Version: OS:

 

 [2005-11-22 01:58 UTC] 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., ??&#5389;&#3352;?l??&#5389;&#3355;?l??&#5389;&#3354;?l??&#5389;&#3349;?l??&#5389;&#3348;?l??&#5133;&#3357;?l??&#5133;&#3356;?l??&#5133;&#3359;?l??&#5133;&#3358;?l??&#5133;&#3353;?l??&#5133;&#3352;?l??&#5133;&#3355;?l??&#5133;&#3354;?l??&#5133;&#3349;?l??&#5133;&#3348;?l??&#5901;&#3357;?l??&#5901;&#3356;?l??&#5901;&#3359;?l??&#5901;&#3358;?l??&#5901;&#3353;?l??&#5901;&#3352;?l??&#5901;&#3355;?l??&#5901;&#3354;?l??&#5901;&#3349;?l??&#5901;&#3348;?l??&#5645;&#3357;?l??&#5645;&#3356;?l??&#5645;&#3359;?l??&#5645;&#3358;?l??&#5645;&#3353;?l??&#5645;&#3352;?l??&#5645;&#3355;?l??&#5645;&#3354;?l??&#5645;&#3349;?l??&#5645;&#3348;?l??&#6413;&#3357;?l??&#6413;&#3356;?l??&#6413;&#3359;?l??&#6413;&#3358;?l??&#6413;&#3353;?l??&#6413;&#3352;?l??&#6413;&#3355;?l??&#6413;&#3354;?l??&#6413;&#3349;?l??&#6413;&#3348;?l??&#6157;&#3357;...)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-22 03:12 UTC] 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-30 01:00 UTC] 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".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC