title: How can I get the classname from a static call in an extended PHP class?
body: <p>I have two classes: <code>Action</code> and <code>MyAction</code>. The latter is declared as:</p>
  
  <pre><code>class MyAction extends Action {/* some methods here */}
  </code></pre>
  
  <p>All I need is method in the <code>Action</code> class (only in it, because there will be a lot of inherited classes, and I don’t want to implement this method in all of them), which will return classname from a static call. Here is what I’m talking about:</p>
  
  <pre><code>Class Action {
   function n(){/* something */}
  }
  </code></pre>
  
  <p>And when I call it:</p>
  
  <pre><code>MyAction::n(); // it should return "MyAction"
  </code></pre>
  
  <p>But each declaration in the parent class has access only to the parent class <code>__CLASS__</code> variable, which has the value “Action”.</p>
  
  <p>Is there any possible way to do this?</p>