|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-11-12 10:43 UTC] joey at cvs dot php dot net
[1999-12-09 19:25 UTC] joey at cvs dot php dot net
[1999-12-09 19:29 UTC] joey at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 15:00:01 2025 UTC |
<? setlocale (LC_ALL, "de_DE"); // or other locale with dec. sep = , $v = 3; $v /= 4; print $v; echo $v; printf ("%7.2f", $v); ?> If built as apache module, set locale is set global. Successive calls to print and echo work under the current locale. Printf is never affected by the locale setting. After setting the locale code like $v = 3.4; is no longer parsed correctly. $v = 3,4; is rejected as syntax error. The syntax says "." is the decimal separator, but actually "," is used. Only $v = "3,4"; works OK. I think that calling the C-function setlocale from within php's code is not the right way to provide locales.