PHP 4.0 Bug #9834 Updated: Unable to handle double variables
| From: | sniper@php.net | Date: | Mon, 19 Mar 2001 16:49:08 +0000 |
| Subject: | PHP 4.0 Bug #9834 Updated: Unable to handle double variables | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-49356@lists.php.net to get a copy of this message | ||
ID: 9834
Updated by: sniper
Reported By: jan.wurl@prosales-europe.com
Old-Status: Open
Status: Feedback
Bug Type: Math related
Assigned To:
Comments:
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.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2001-03-19 06:11:28] jan.wurl@prosales-europe.com
I try to set a variable with a double value:
$a=2.54;
$b="2.54"
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
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9834&edit=2