title: In a PHP5 class, when does a private constructor get called?
body: <p>Let's say I'm writing a PHP (>= 5.0) class that's meant to be a singleton.  All of the docs I've read say to make the class constructor private so the class can't be directly instantiated.</p>
  
  <p>So if I have something like this:</p>
  
  <pre><code>class SillyDB
  {
    private function __construct()
    {
  
    }
  
    public static function getConnection()
    {
  
    }
  }
  </code></pre>
  
  <p>Are there any cases where __construct() is called other than if I'm doing a </p>
  
  <pre><code>new SillyDB() 
  </code></pre>
  
  <p>call inside the class itself?  </p>
  
  <p>And why am I allowed to instantiate SillyDB from inside itself at all?</p>