note 96698 added to reserved.variables.session

From: Date: Fri, 12 Mar 2010 01:43:40 +0000
Subject: note 96698 added to reserved.variables.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-166933@lists.php.net to get a copy of this message
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. ---- Server IP: 69.147.83.197 Probable Submitter: 187.11.153.244 ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.session.php Edit -- https://master.php.net/note/edit/96698 Del: integrated -- https://master.php.net/note/delete/96698/integrated Del: useless -- https://master.php.net/note/delete/96698/useless Del: bad code -- https://master.php.net/note/delete/96698/bad+code Del: spam -- https://master.php.net/note/delete/96698/spam Del: non-english -- https://master.php.net/note/delete/96698/non-english Del: in docs -- https://master.php.net/note/delete/96698/in+docs Del: other reasons-- https://master.php.net/note/delete/96698 Reject -- https://master.php.net/note/reject/96698 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#166933) next »