The functioning part both the syntax will work the same but by inditing session_unset will clears the $_SESSION variable but will not ravage the variables and it will initialize to this stage:
session_unset(); effaces only the variables from session but session still subsists. It will just truncate the variable -
session_unset does not take any parameters. It liberates ALL session variables.
How it works
<?php
// only remove all session variables
session_unset();
?>
session_destroy(); is deleting the all session.
session_destroy Ravages all data registered to a session
<?php
// destroy all the session
session_destroy();
?>
0 Comment(s)