title: Best practices for static constructors
body: <p>I want to create an instance of a class and call a method on that instance, in a single line of code.</p>
  
  <p>PHP won't allow calling a method on a regular constructor:</p>
  
  <pre><code>new Foo()-&gt;set_sth(); // Outputs an error.
  </code></pre>
  
  <p>So I'm using, if I can call it that, a static constructor:</p>
  
  <pre><code>Foo::construct()-&gt;set_sth();
  </code></pre>
  
  <p>Here's my question:</p>
  
  <p>Is using static constructors like that considered a good practice and if yes, how would you recommend naming the methods for these static constructors?</p>
  
  <p>I've been hesitating over the following options:</p>
  
  <pre><code>Foo::construct();
  Foo::create();
  Foo::factory()
  Foo::Foo();
  constructor::Foo();
  </code></pre>