title: How can a session variable equality check have a different result only in Safari?
body: <p>I have a function as follows:</p>
  
  <pre><code>function checkKey($key, $instance, $use = true) {
  
      $validKey = false;
  
      if ($key == $_SESSION[$instance]) {
          $validKey = true;
          if ($use) {
              unset($_SESSION[$instance]);
          }
      }
  
      return $validKey;
  }
  </code></pre>
  
  <p>This is working exactly as expected when called in e.g. Chrome and Firefox, but always returning false in Safari.</p>
  
  <p>Are there any known issues regarding Safari handling session variables in a different way than other browsers? Is there anything obvious I could be doing to get around Safari not cooperating with the above code?</p>
  
  <p>ETA: Maybe I can clarify this further. I have a collection of links, each of which should be able to download a file once. When the links are generated, a key is created, included in the querystring of the link, and set as a session variable. When the link is used, the key is checked, either the file or a 404 is given, and the session variable in unset. As stated, this works as desired in Chrome, but fails every time in Safari... surely there must be something about trying to do this kind of thing that Safari doesn't like?</p>