title: How do check if a PHP session is empty?
body: <p>Is this bad practice?</p>
  
  <pre><code>if ($_SESSION['something'] == '')
  {
      echo 'the session is empty';
  }
  </code></pre>
  
  <p>Is there a way to check if its empty or it is not set? I'm actualy doing this:</p>
  
  <pre><code>if (($_SESSION['something'] == '') || (!isset($_SESSION['something'])) {
      echo 'the session is either empty or doesn\'t exist';
  }
  </code></pre>
  
  <p>Does <code>!isset</code> just checks if a <code>$_SESSION['']</code> exist and doesn't check if, is there are values in the array or not</p>