From the previous note:
--------------------------------------------------
So, forget session_register(), session_unregister(), session_destroy() and al those stupid functions. The only thing you need is the super global $_SESSION.
--------------------------------------------------
I do have to disagree about the session_destroy() function; if you want to remove the session file created in the server tmp or whatever folder, you must use session_destroy() function.
The <?php $_SESSION = array(); ?> code only unsets the superglobal variables.
For clearing the superglobals, the cookie and deleting the server session file, my advice would be using the code below.
<?php
//session_start(); // if your session wasn't started yet
setcookie(session_name() ,"",0,"/");
unset($_COOKIE[session_name()]);
$_SESSION = array();
session_unset();
session_destroy();
?>