title: "superglobal object"
body: <p>Using the following as an example (with $db being a previously created database connection object)...</p>
  
  <pre><code>Class Session {
     function write_log () {
       global $db;
       $db-&gt;query(...);
     }
  }
  </code></pre>
  
  <p>Is there a way to avoid having to write "global $db" everytime I want to use the $db object inside of another class?  In other words, declare the $db object as a superglobal from the very beginning.</p>