ID: 47065 Updated by: johan...@php.net Reported By: opurahman at gmail dot com -Status: Open +Status: Bogus Bug Type: Session related Operating System: Linux PHP Version: 5.2.8 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Note: If $_SESSION (or $HTTP_SESSION_VARS for PHP 4.0.6 or less) is used, use unset() to unregister a session variable, i.e. unset ($_SESSION['varname']);. session_unset() is to be ued when using register_globals() which is not advised. Previous Comments: ------------------------------------------------------------------------ [2009-01-11 08:37:22] opurahman at gmail dot com Description: ------------ function session_unset() reset local variables. I was trying to reset session variables after storing two values from session. It reset my local variables. Lets take a look into the codes bellow. Reproduce code: --------------- session_start(); $message = sprintf('%s', $_SESSION['message']); echo('Here Message: # ' . $message . '<br />'); session_unset(); echo('Here Message: # ' . $message . '<br />'); // in this line, the variable $message has been unset. Expected result: ---------------- It should display the value of $message ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47065&edit=1