note 32378 added to function.setlocale
| From: | brice at allenbrand dot com | Date: | Mon, 26 May 2003 08:58:43 +0000 |
| Subject: | note 32378 added to function.setlocale | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-49019@lists.php.net to get a copy of this message | ||
French users warning ! (PHP 4.1.2)
Check this : result will be 0.125 and NOT 0.625
first file : test.php
<?PHP
setlocale(LC_ALL,"fr_FR");
include "testinclude.php";
pipo(0.125);
?>
------------------------
second file : testinclude.php
<?PHP
function pipo($a)
{
$a=$a+0.5;
echo $a;
}
?>
------------------------
To avoid this, put the setlocale in the include file and everything will be ok.
----
Manual Page -- http://www.php.net/manual/en/function.setlocale.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32378
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32378&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32378&report=yes