<?php
session_start();
$lengthOfSessionArray = count($_SESSION);// if user logout session destroies so session array will empty==0.
if ($lengthOfSessionArray == 0) {
    echo true;
} else {
    echo false;
}
?>
