note 8119 added to session_unset
| From: | ks at ksweb dot de | Date: | Mon, 28 Aug 2000 11:22:03 +0000 |
| Subject: | note 8119 added to session_unset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-3544@lists.php.net to get a copy of this message | ||
I think that wrong!
session_unset() does not make any 'unregister' !
it makes a 'unset' with the registered globals in memory and in the session-file, but the
variables are still registered !!
<?
session_register('a','b','c'); //auto-session-start
$a=1;
$b=2;
$c=3;
session_unregister('a'); //unregistrered $a
echo "A: $a - reg:".session_is_registered('a')."<br>"; // but
the global $a remains
session_unset(); // unsets $b und $c
echo "B:$b - reg:".session_is_registered('b')."<br>"; // the
registration remains !
echo "C:$c - reg:".session_is_registered('c')."<br>";
echo session_encode();
?>
outputs:
A: 1 - reg:
B: - reg:1
C: - reg:1
!b|!c|
http://www.php.net/manual/de/function.session-unset.php