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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Federico at Pomi dot net
New email:
PHP Version: OS:

 

 [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: Wed Apr 24 16:01:31 2024 UTC