In the PHP documentation for session_unset()
there is no hint that this function is deprecated so I think it's fine to use it. But then I read through the documentation about session_destroy()
where I found this hint:
Note: Only use session_unset() for older deprecated code that does not use $_SESSION.
I know that the session_unset()
function is an equivalent for $_SESSION = array();
. So what should I use now? Why is on one site a hint that this function is deprecated but on the other hand in the documentation about the function itselfs there is not deprecated note. What's the truth about this function now?