|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-11-05 06:14 UTC] stas@php.net
[2000-12-15 20:18 UTC] sniper@php.net
[2001-02-20 07:30 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 13:00:01 2025 UTC |
My LANG environment variable is "german". At the beginning of every page, I do `setLocale('LC_ALL', 'en_US')'. With those settings, float session variables are saved with `,' as decimal point, but loading seems to expect `.' so that I get values truncated to ints. Example script: <? setLocale('LC_ALL', 'en_US'); session_start(); $x = & $HTTP_SESSION_VARS['x']; if (!isset($x)) $x = 1; $x *= '1.1'; print("$x<br>\n"); printf("<a href=\"%s\">go</a>\n", $HTTP_SERVER_VARS['PHP_SELF']); // (link relies on transparent sid) ?> The session file contains `x|d:1,1;', and the page always shows `1.1', since the loaded value becomes 1.