php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5203 Floating Point numbers don't work (it uses integers)
Submitted: 2000-06-23 15:30 UTC Modified: 2000-06-24 02:11 UTC
From: Federico at Pomi dot net Assigned:
Status: Closed Package: Other
PHP Version: 4.0.0 Release OS: Linux (RedHat 6.1 and 6.2 boxes)
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:
MUST BE VALID
Solve the problem:
31 + 9 = ?
Subscribe to this entry?

 
 [2000-06-23 15:30 UTC] Federico at Pomi dot net
Floating Point numbers don't work on my setup.
Example:

$mystring="1.25";
$mydouble=(double) $mystring;
print($mydouble);

prints out "1", instead of "1.25". 

I did several tests, even with code from documentation, and I always get integer numbers, both on my box and my ISP box (similar config). On other boxes it seems to work nicely.
It worked nicely even on my box with PHP3 installed.

I also tried to add BCMATH support, but it still doesn't work.
I configured my php4 with:
./configure --with-apxs=/usr/sbin/apxs --with-mysql --with-pdflib --disable-debug

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-24 02:11 UTC] stas at cvs dot php dot net
Most probably famous locale problem. Will be OK in 4.0.1
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 21:01:30 2024 UTC