|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44084 dividing problem
Submitted: 2008-02-09 14:58 UTC Modified: 2008-02-10 05:19 UTC
From: hosting at indiannic dot com Assigned:
Status: Not a bug Package: Math related
PHP Version: 5.2.5 OS: windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
36 - 27 = ?
Subscribe to this entry?

 [2008-02-09 14:58 UTC] hosting at indiannic dot com
dividing a float value with another gives result as 10 always

Reproduce code:
$test = 46985.532 / 3600 ;


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-09 15:56 UTC] hosting at indiannic dot com
a few links below

we have php 5 and php 4 both on the same server

windows 2000 with iis 5

this is on php 5.2.5
this gives correct Wrong answer

this is on php 4.3.10
this gives correct answer
 [2008-02-09 15:58 UTC]
[marcus@zaphod PHP_5_3]$ php -r 'var_dump(46985.532 / 3600 );'
make: `sapi/cli/php' is up to date.
[marcus@zaphod PHP_5_3]$ php -r '$t=46985.532/3600; var_dump($t);'
make: `sapi/cli/php' is up to date.
[marcus@zaphod PHP_5_3]$ php -r '$t=46985.532/3600; echo($t);'
make: `sapi/cli/php' is up to date.
13.051536666667[marcus@zaphod PHP_5_3]$

Same for 5.2
 [2008-02-10 05:19 UTC]
And why in the world did you open 3 reports for the same problem.

User error - bogus config
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Dec 05 22:01:29 2023 UTC