ID:               31026
 User updated by:  tobi at knmm dot de
 Reported By:      tobi at knmm dot de
-Status:           No Feedback
+Status:           Open
 Bug Type:         Variables related
 Operating System: Linux 2.6.8 (Debian sarge)
-PHP Version:      4.3.9
+PHP Version:      4.3.10RC3-dev
 New Comment:

Now, with the CVS version the script says '34,9' instead of 34.9 (with
4.3.9 it was only '34').
This solves my problem, which was that calculations with variables,
type-converted from string to float had gone wrong sometimes. 
But it's still very strange.
I figured out that the problem only occurrs if the apache webserver
with php on it already ran for a few hours.


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

[2004-12-16 01:00:02] 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".

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

[2004-12-08 21:37:43] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

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

[2004-12-08 20:37:49] tobi at knmm dot de

Description:
------------
A very strange problem occurs on my webserver. If you run the provided
code via http://knmm.de/bug.php a few times, in about 1 out of 10 times
the second line of output is "$price is a double with value 34". This
shows up randomly.
Running the script on the commandline of the same machine doesn't show
this behaviour.

--
Tobi

Reproduce code:
---------------
$price = '34.90';

echo "\$price is a ".gettype($price)." with value $price\n";
settype($price,'double');
echo "\$price is a ".gettype($price)." with value $price\n";

(also available via http://knmm.de/bug.phps)

Expected result:
----------------
$price is a string with value 34.90
$price is a double with value 34.9


Actual result:
--------------
$price is a string with value 34.90
$price is a double with value 34



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


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

Reply via email to