title: Can't use function return value in write context
body: <p>I have this simple session class</p>
  
  <pre><code>class Session
  {
      public static function init() {
         @session_start();
      }
  
      public static function set($key, $value) {
          $_SESSION[$key] = $value;
      }
  
      public static function get($key) {
          if (isset($_SESSION[$key]))
              return $_SESSION[$key];
      }
  
      public static function destroy() {
          unset($_SESSION);
          session_destroy();
      }
  }
  </code></pre>
  
  <p>In my other class I have</p>
  
  <pre><code>public function verifyFormToken($form)
  {
      // check if a session is started and a token is transmitted, if not return an error
      if(!isset(Session::get($form.'_token'))){ 
          return false;
      }
  
      // check if the form is sent with token in it
      if(!isset($data['token'])) {
          return false;
      }
  
      // compare the tokens against each other if they are still the same
      if (Session::get($form.'_token') !== $data['token']) {
          return false;
      }
  
      return true;
  }
  </code></pre>
  
  <p>I can set a session no problem but when I come to get it using <code>verifyFormToken()</code>, i get this error message</p>
  
  <blockquote>
    <p>Can't use function return value in write context</p>
  </blockquote>
  
  <p>which points to this line</p>
  
  <pre><code>if(!isset(Session::get($form.'_token'))){ 
  </code></pre>