php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73273 session_unset() empties values from all variables in which is $_session stored
Submitted: 2016-10-09 13:28 UTC Modified: 2016-10-10 10:05 UTC
From: ghostovice at gmail dot com Assigned: nikic (profile)
Status: Closed Package: Session related
PHP Version: 7.0.11 OS: Linux Mint 18
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ghostovice at gmail dot com
New email:
PHP Version: OS:

 

 [2016-10-09 13:28 UTC] 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
(
)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-09 17:54 UTC] yohgaki@php.net
-Status: Open +Status: Not a bug
 [2016-10-09 17:54 UTC] yohgaki@php.net
This is what it suppose to do.

http://php.net/manual/en/function.session-unset.php
 [2016-10-10 10:05 UTC] nikic@php.net
-Status: Not a bug +Status: Assigned -Assigned To: +Assigned To: nikic
 [2016-10-10 10:21 UTC] nikic@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c91f652ddbca784d9fc0c25fb2015923c6aca438
Log: Fixed bug #73273
 [2016-10-10 10:21 UTC] nikic@php.net
-Status: Assigned +Status: Closed
 [2016-10-17 10:07 UTC] bwoebi@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c91f652ddbca784d9fc0c25fb2015923c6aca438
Log: Fixed bug #73273
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 30 06:01:32 2025 UTC