|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35340 Apache2 needs 100% CPU when passed a float
Submitted: 2005-11-22 21:38 UTC Modified: 2005-12-07 01:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: gggiuly at gmail dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 4.4.1 OS: GNU/Linux
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: gggiuly at gmail dot com
New email:
PHP Version: OS:


 [2005-11-22 21:38 UTC] gggiuly at gmail dot com
THe CPU-Usage raises to 98% when a float was passed to this function, which definitifely shouldn't happen.

Can be fixed with stars((int) 4.7) but shouldn't

Reproduce code:
function stars($full) {
  for($i=0; $i<$full; $i++)
    $toRet .= '<img src="images/star1.gif" width="10" height="10" border="0">';

    $toRet .= '<img src="images/star2.gif" width="10" height="10" border="0">';

  return $toRet;


Expected result:
4x star1.gif, 1x star2.gif

Actual result:
Apache raises CPU-Usage at 98%


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-22 21:43 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

Can't reproduce.
 [2005-12-07 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-2022 The PHP Group
All rights reserved.
Last updated: Sat Aug 13 15:05:45 2022 UTC