PHP 4.0 Bug #8500: double constants with different locale

From: Date: Sun, 31 Dec 2000 16:41:44 +0000
Subject: PHP 4.0 Bug #8500: double constants with different locale
Groups: php.dev 
Request: Send a blank email to php-dev+get-42568@lists.php.net to get a copy of this message
From: pascal@craponne.org Operating system: Win2K server FRENCH PHP version: 4.0.4 PHP Bug Type: Scripting Engine problem Bug description: double constants with different locale 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. -- Edit Bug report at: http://bugs.php.net/?id=8500&edit=1

« previous php.dev (#42568) next »