note 96698 deleted from reserved.variables.session by danbrown

From: Date: Fri, 12 Mar 2010 01:45:06 +0000
Subject: note 96698 deleted from reserved.variables.session by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-166935@lists.php.net to get a copy of this message
Note Submitter: jayon ---- Not sure if it's a bug, on purpose, or something, but using php5 (uh, 5.3 I think) and $_SESSION doesn't save numeric keyed data over the session. Is it working as supposed to? A little test would be: <?php session_start(); $hold = count($_GET); $_SESSION[$hold] = $hold."_".time(); $_SESSION[$hold."_".time()] = $hold."_".time(); foreach( $_GET as $k => $v ) { $_SESSION[$k] = $v; } echo "<pre>"; print_r($_SESSION); echo "</pre>"; ?> You can keep changing the get line and you can see that the numbered keys in the $_SESSION array are lost.

« previous php.notes (#166935) next »