According to the manual "Do NOT unset the whole $_SESSION with unset($_SESSION) as this will disable the registering of session variables through the $_SESSION superglobal."
<?php
session_start();
$_SESSION['name'] = 'my_name';
unset($_SESSION);
echo $_SESSION['test'] = 'ok';
So according to the manual, the above code should not register the last statement. But the code outputs the string 'ok'. What is going on here?