|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-04-24 05:21 UTC] rprporwal9 at gmail dot com
Description: ------------ After session initialization we store data in session super global array but after invocation of session_destroy function which is used to destroy session data in session super global variable should also be unset simultaneously. Otherwise there is no meaning of session_destroy if data persists in session super global variable Also according to documentation of session_destroy function as mentioned in php.net Destroys all data registered to a session Hence I suggest that data should not persist after session is destroyed in super global $_SESSION variable otherwise there is no reliability of session_destroy() function. Test script: --------------- session_start(); $_SESSION['xyz']=99; session_destroy(); print_r($_SESSION); PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
function my_special_session_destroy() { session_destroy(); unset($_SESSION); } Since this can easily be implemented in userland, but changing the behavior of session_destroy() would introduce a BC break, I see no point in this feature. If you feel stronly that this would be an improvement, please forward the feature request to the internals mailing list.