session_destroy delete session data in the medium (file, database, etc.) where it is stored but does not delete the $_SESSION or cookies, you must do this manually, including the PHPSESSID cookie.
I usually delete sessions with something like this:
foreach($_SESSION as $key => $val) unset($_SESSION[$key]); foreach($_COOKIE as $key => $val) setcookie($key, '', 1); session_destroy();
BTW, when you call session_regenerate_id() , the session file is copied to the new file, but the old one is not deleted, if you want to delete the old data session file (maybe you want), you must specify it with session_regenerate_id(TRUE) .
source share