|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36356 After form submit system changing value other then entered
Submitted: 2006-02-10 16:34 UTC Modified: 2006-02-10 16:40 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: Vlad at valuead dot com Assigned:
Status: Not a bug Package: *Math Functions
PHP Version: 4.4.2 OS: Gentoo
Private report: No CVE-ID: None
 [2006-02-10 16:34 UTC] Vlad at valuead dot com
Form submitting a dollar value $2.30 saved in MYSQL as $2.29, any other value is fine like 2.40
4 people looked it it - nothing out of ordinary

Reproduce code:

For whatever reason intval(230.0) returns 229

field CPM Cost
if nessesary would be happy to provide access to demo system

Expected result:
system should of store 2.30 in the database insted of 2.29

Actual result:
$2.99 in database after form submission insted of 2.30


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-10 16:39 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

 [2006-02-10 16:40 UTC]
Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.

If you would like to know more about "floats" and what IEEE
754 is read this:
Thank you for your interest in PHP.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 13:01:28 2024 UTC