Bug #73273 [Nab->Asn]: session_unset() empties values from all variables in which is $_session stored
Edit report at https://bugs.php.net/bug.php?id=73273&edit=1
ID: 73273
Updated by: nikic@php.net
Reported by: ghostovice at gmail dot com
Summary: session_unset() empties values from all variables in
which is $_session stored
-Status: Not a bug
+Status: Assigned
Type: Bug
Package: Session related
Operating System: Linux Mint 18
PHP Version: 7.0.11
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2016-10-09 17:54:02] yohgaki@php.net
This is what it suppose to do.
http://php.net/manual/en/function.session-unset.php
------------------------------------------------------------------------
[2016-10-09 13:28:50] ghostovice at gmail dot com
Description:
------------
session_unset() empties values from all variables in which is $_session stored
Test script:
---------------
<?php
session_start();
$_SESSION['test'] = true;
$var = $_SESSION;
session_unset();
print_r($var);
Expected result:
----------------
Array
(
[test] => 1
)
Actual result:
--------------
Array
(
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73273&edit=1
Thread (4 messages)