I previously used these three lines to delete a session:
session_start();
session_regenerate_id();
session_destroy();
Does session_destroy() close the session, or do I have to close it manually?
session_start();
session_regenerate_id();
$_SESSION = array();
session_write_close();
If you are destroying the session then there isn’t really a need to session_write_close(), as in the manual it does the following: