title: PHP - init class with a static function
body: <p>I would like to call a class without initializing it even if it's normally not static. So basically it should init itself with the first method call.</p>
  
  <p>I'm wondering how laravel is doing this:</p>
  
  <pre><code>$someClass = SomeClass::where()-&gt;get()
  </code></pre>
  
  <p>This works on every method they provide.</p>
  
  <p>I googled a long time but as long as you don't know the name of this behavior it's really hard to find. </p>
  
  <p>Would be nice if you could help me out.</p>