title: DBFactory, works only use static
body: <p>-------Now, another question, can anyone explain?</p>
  
  <pre><code>class DBFactory {  
                  static function create(){  
                  return new MysqlDB();  
          }  
      }  
  class MysqlDB{ 
      function alo(){  
          echo 'ok';  
          }
  }  
  $db = DBFactory::create();  
  $db-&gt;alo();  
  </code></pre>
  
  <p>--->Works  </p>
  
  <pre><code>class DBFactory {  
                  function create(){  
                  return new MysqlDB();  
          }  
      }  
  class MysqlDB{ 
      function alo(){  
          echo 'ok';  
          }
  }  
  $db = new DBFactory;  
  $db-&gt;create();  
  $db-&gt;alo();    
  </code></pre>
  
  <p>--->Not works</p>