title: Should a class ever have static and non-static members
body: <p>I'm trying to figure out when it would be appropriate for a class to have both static and non-static functions. AKA:</p>
  
  <pre><code>$obj = new ClassA;
  $obj-&gt;doOOPStuff();
  
  $something = ClassA::doStaticStuff();
  </code></pre>
  
  <p><sup>Note: This example is done in PHP, however the question is language agnostic .</sup></p>
  
  <p>It seems that if you have a class that is meant to be instantiated, any functions that can be called statically, most likely belong in another class. </p>
  
  <p>Is there any viable cases where I would have a class that used static AND non-static members?</p>