title: How can I tell if a function is being called statically in PHP?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1647735/how-to-tell-whether-im-static-or-an-object">How to tell whether I’m static or an object?</a>  </p>
  </blockquote>
  
  
  
  <p>Let's say I have a <code>FooClass</code> with a <code>bar()</code> method. Inside of the <code>bar()</code> method, is there any way to tell if it's being called statically or not, so I can treat these two cases differently? </p>
  
  <pre><code>FooClass::bar();
  $baz = new FooClass();
  $baz-&gt;bar();
  </code></pre>