note 34437 deleted from function.unset by rioter
| From: | rioter@php.net | Date: | Sun, 27 Jul 2003 11:57:38 +0000 |
| Subject: | note 34437 deleted from function.unset by rioter | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-52743@lists.php.net to get a copy of this message | ||
Note Submitter: frederic.royet@logipro.com
----
Big probleme to unset session variables. Specially object.
I had an object in the session:
1st page
$caddie = new Caddie();
$_SESSION["caddie"]
2nd page: i want to unregister it from the session (PHP 4.2 with register_globals=On)
Following try hadn't worked:
1)
unset($_SESSION["caddie"])
2)
unset($_SESSION["caddie"],$caddie)
3)
$caddie=$_SESSION["caddie"]
session_unregister($caddie)
I tried:
$_SESSION["caddie"]=null
I worked!!!
Why ?, Is it a good solution ?