|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-15 13:01 UTC] domnulnopcea at yahoo dot com
[2007-08-15 17:24 UTC] johannes@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 23:00:02 2025 UTC |
Description: ------------ I came across this situation: I had and object named "grid" which was a wrapper for a table. In $_SESSION I already had a mysql singleton wrapper. I tried to set another session variable with the key "grid1" and value, lets say "text". The result I got was that PHP loaded the object "grid1" in $_SESSION. After I changed the key name, let say "grid1_text" I got the expected results! Reproduce code: --------------- $grid1 = new GridPrototype(); $grid1->setPerPage(4); $grid1->setID("1"); $grid1->setKey(); $id = "1"; $key = "grid" . $id; $_SESSION[$key] = $status; Expected result: ---------------- I expect to have the $status variable accessible via $_SESSION['grid1'] Actual result: -------------- $_SESSION['grid1'] points to the object $grid1