In other studies, we used the isset() function to check its existence. This function returns a positive if there is a session or a negative.

<?php
session_start();
echo isset($_SESSION ['test']);
?>