|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9834 Unable to handle double variables
Submitted: 2001-03-19 06:11 UTC Modified: 2001-04-19 09:33 UTC
From: jan dot wurl at prosales-europe dot com Assigned:
Status: Closed Package: Math related
PHP Version: 4.0.4pl1 OS: Windows 2000
Private report: No CVE-ID: None
 [2001-03-19 06:11 UTC] jan dot wurl at prosales-europe dot com
I try to set a variable with a double value:


but PHP ignores everything after the point

echo ($a*100) results 200
echo ($b*100) results 200

I tried everything, i thought it might be work (like setting datatype before set the value, ...), but nothing worked.

Jan Wurl


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-19 11:49 UTC]
Works for me just fine. But I think it's some locale
thingie. You might have ',' as the decimal separator.
Try setting the locale correctly:

setlocale(LC_NUMERIC, "en_US"); 

or something like that. Or you ',' as the separator.


 [2001-04-19 09:33 UTC]
No feedback.


 [2004-08-04 00:52 UTC] robin dot avery at nospamforme dot com
try this:


the forward slashes show that "." is not special.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 21 03:01:33 2024 UTC