title: Fatal Error: Class 'SELF' not found
body: <p>I have the following relevant code:</p>
  
  <pre><code>try {
      self::$db = new PDO($dsn, self::USER, SELF::PASS); //Connect to the database, and store the pdo object.
      self::$db-&gt;setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
  }
  catch (PDOException $e) {
      throw new Exception("There have been an error in the connection: ". $e-&gt;getMessage());
  }
  </code></pre>
  
  <p>When executing the static function this code is in, I get the following error:</p>
  
  <blockquote>
    <p><strong>Fatal error</strong>: Class 'SELF' not found in <strong>P:ath/to/script.php</strong> on line <strong>107</strong></p>
  </blockquote>
  
  <p>I have no idea what might cause this, can anyone please enlighten me?</p>
  
  <p>Thanks in advance.</p>