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
 [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: Tue Apr 16 06:01:30 2024 UTC