php why call setcookie before session_destory code example Example: php session destroy <?php // Destroy the currently active session. session_destroy(); ?>