ID:               47304
 Comment by:       egorich at junik dot lv
 Reported By:      lennartvdd at mailordersolutions dot nl
 Status:           Assigned
 Bug Type:         Scripting Engine problem
 Operating System: win32 only
 PHP Version:      5.2.9
 Assigned To:      pajoye
 New Comment:

Seems that it fixed with rolling back to php 5.2.5 to me.


Previous Comments:
------------------------------------------------------------------------

[2009-06-22 16:21:28] ciudadsatan at hotmail dot com

The bug in Linux happens with
    echo 0.15-0.05;

------------------------------------------------------------------------

[2009-06-22 03:47:55] ang dot chin dot han at gmail dot com

Originally from:

http://www.reddit.com/r/programming/comments/8tqpj/phpwtf_an_annoyance_
will_be_posted_each_day/c0aeg66

In short, in a Ubuntu Hardy 32 bit (64bit unaffected), 5.2.4 (with 
Ubuntu patches) a simple

  echo 1.0-0.5;

produces "0.0:" instead of "0.1" like in other platforms.

Not sure if it's the same bug as this is casting from float to string.

------------------------------------------------------------------------

[2009-06-08 09:47:15] egorich at junik dot lv

So, any solutions to this? 
The problem also arises when i try to convert string to double, like:
$amount = double($amount);

------------------------------------------------------------------------

[2009-03-20 22:44:12] egorich at junik dot lv

10 minutes passed and now I see "16.:" printed. Of course nothing is
changed at that time on the server...

------------------------------------------------------------------------

[2009-03-20 22:32:59] egorich at junik dot lv

Concerning bug #47732:

I was using PHP 5.2.6, and did not noticed that problem. It started
just after an upgrade to 5.2.9-1. 

And now the strange thing:
I left home with my browser opened on a test script page

<?
echo ceil(3350/200);
?>

And it printed "16.:".
When I came back after 5 hours and hit refresh... It printed "17"!
During that time nothing was changed in the server setup, php still is
5.2.9-1, etc...


My system:
Windows 2003 small business server SP2, x86
Apache 2.2
PHP 5.2.9-1

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/47304

-- 
Edit this bug report at http://bugs.php.net/?id=47304&edit=1

Reply via email to