For just the functioning part both the syntax will work the same but by writing session_unset will clears the $_SESSION variable but will not destroy the variables and it will initialize to this stage:-
$_SESSION = array();
session_destroy(); is deleting the whole session.
session_unset(); deletes only the variables from session but session still exists. It will just truncate the variable
0 Comment(s)