What is the use of session_start() and session_destroy() functions in PHP?

The session_start() function is used to start a new session. Also, it can resume an existing session if it is stopped. In this particular case, the return will be the current session if resumed.

Syntax:

session_start();

The session_destroy() function is used to destroy all of the session variables as given below:

<?php
session_start();
session_destroy();
?>