#17815 [Dup->Csd]: Zend scanner + setlocale() = wrong floating point numbers
| From: | sniper@php.net | Date: | Mon, 11 Nov 2002 00:37:30 +0000 |
| Subject: | #17815 [Dup->Csd]: Zend scanner + setlocale() = wrong floating point numbers | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24503@lists.php.net to get a copy of this message | ||
ID: 17815
Updated by: sniper@php.net
Reported By: sitnikov@infonet.ee
-Status: Duplicate
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 4.2.1
Assigned To: hholzgra
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-06-18 12:26:15] sander@php.net
There's already a report for this: 17105
------------------------------------------------------------------------
[2002-06-18 11:29:23] sitnikov@infonet.ee
a.php
<?
setlocale(LC_ALL,'ru_RU');
$a = 1.3;
var_dump($a);
include('b.php');
?>
b.php
<?
$a = 1.3;
var_dump($a);
?>
shell>GET http://host/a.php
float(1.3)
float(1)
ru_RU use
, for decimal separator.
Workaround for this bug:
setlocale(LC_NUMERIC,'C');
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17815&edit=1