title: Singleton pattern + __construct in PHP4
body: <p><strong>To clarify:</strong></p>
  
  <ul>
  <li>no I can't make this pure PHP5</li>
  <li>yes  this code works in PHP 4.3.9.</li>
  </ul>
  
  <p>I don't have any real world experience implementing or supporting PHP4 but I had to recently change my class so it supports both PHP4 and PHP5.</p>
  
  <ul>
  <li>Can anyone foresee any possible issues in regards to my implementation of the singleton method used here? I only want one instance of this class.</li>
  <li>I know I could completely get rid of the <code>__construct</code> method, should I? ( and move the function body of it to the Conf function ).</li>
  <li>Could I have used <code>self</code> anywhere? I wasn't sure of its PHP4 support.</li>
  </ul>
  
  <hr>
  
  <pre><code>&lt;?php
  
  class Conf {
      function Conf( $filename ) {
          $this-&gt;__construct( $filename );
      }
  
      function __construct( $filename ) {
          echo $filename;
      }
  
      function getInstance( $filename ) {
          static $instance = null;
          if ( $instance == null ) {
              $instance = new Conf( $filename );
          }
          return $instance;
      }
  }
  
  $x = Conf::getInstance( 'file.xml' );
  </code></pre>