title: Cannot use object of type __PHP_Incomplete_Class as array
body: <p>I have the following code:</p>
  
  <pre><code>class user{
      public function __construct(){
      }
  }
  $user = new user;
  $id = $_SESSION['user'];
  </code></pre>
  
  <p>which results in the error "Cannot use object of type __PHP_Incomplete_Class as array".
  Changing <code>$_SESSION['user']</code> to <code>$_SESSION['_user']</code> corrects this.</p>
  
  <p>I am only experiencing this in my development environment. My live environment does not produce this error.</p>
  
  <p>My question: is there a configuration setting that is treating the Session key 'user' as a class object?</p>