|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8500 double constants with different locale
Submitted: 2000-12-31 11:41 UTC Modified: 2001-10-20 23:26 UTC
From: pascal at craponne dot org Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.4 OS: Win2K server FRENCH
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.
Block user comment
Status: Assign to:
Bug Type:
From: pascal at craponne dot org
New email:
PHP Version: OS:


 [2000-12-31 11:41 UTC] pascal at craponne dot org
It is very important to note that this bug occurs only in my french system.


printf("the value is $a, type is %s",gettype($a));

--> outputs
the value is 1, type is double

So, the ".5" has been lost, but the type is correct.

in the "local options" (or "region option"? I don't know, my system is in french), at the tab "numbers", the decimal symbol is set to ",". If I change it to ".", it works.
If I switch back to ",", it doesn't work.

At the moment, to enter constants in PHP, I must do:

So, it could be better for the PHP parser to be "language neutral", to avoid such problems.

Let me know if there is something I can do.

Pascal Craponne.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-08 13:24 UTC]
dupe of #8097
 [2001-10-20 23:26 UTC]
submitted twice (and the other report is also closed)

PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC