ID:               42432
 Updated by:       [EMAIL PROTECTED]
 Reported By:      zoxx at konto dot pl
-Status:           Open
+Status:           Bogus
 Bug Type:         Strings related
 Operating System: FreeBSD
 PHP Version:      5.2.3
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php




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

[2007-08-26 19:59:53] zoxx at konto dot pl

Description:
------------
Bug related with Bugs #41811, #41152.

It's not really round() problem but string conversion made by echo or
concatenation with string. 

It is serious bug with strong consequences:
- php4 was free with that 'feature' so old correctly working scripts
could fail with php5 
- data that is inserted to mysql with exponent notation to mysql
integer fields is cutted to digits (so if you insert 1.41E+7 '1' integer
is inserted instead)
- data could be not displayed correctly, not correctly inserted to
files or passed to external systems (and so on...)
- it is unrelated with 'precision' php.ini configuration item, so
unexpected by programmer

Reproduce code:
---------------
<form action="testval.php" method=POST>
<input type=text name=val>
</form>
<?php
echo $val*100.0;
?>

Expected result:
----------------
input: 410000
output: 41000000

Actual result:
--------------
input: 410000
output: 4.1E+7


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


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

Reply via email to