[PHP-DEV] PHP 4.0 Bug #8500 Updated: double constants with different locale From: cynic <email protected>
Date: 01/08/01

ID: 8500
Updated by: cynic
Reported By: pascal <email protected>
Old-Status: Open
Status: Duplicate
Bug Type: Scripting Engine problem
Assigned To:
Comments:

dupe of #8097

Previous Comments:
---------------------------------------------------------------------------

[2000-12-31 11:41:44] pascal <email protected>
It is very important to note that this bug occurs only in my french system.

Example:

$a=1.5;
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.

Explanation:
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:
$a=(double)"1,5".

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.

---------------------------------------------------------------------------

Full Bug description available at: http://bugs.php.net/?id=8500

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>