title: PHP: Get actual function name
body: <p>I got another problem: I'm just trying to make a nice and sweet log class, and now I'd also like to log the function name in which the program is.</p>
  
  <p>But, to make it better code, is there a function to get the function name of the function which is just executing? It should look just as follows:</p>
  
  <pre><code>&lt;?php
  function test() {
      echo "We are in my function " . getFunctionName();
  }
  ?&gt;
  </code></pre>
  
  <p>And the output would be</p>
  
  <pre><code>We are in my function test()
  </code></pre>
  
  <p>Is something possible at all?</p>
  
  <p>Thanks for help!</p>