title: Determine where a function has been called with PHP
body: <p>do you guys know how can i determine from what file was a function called inside of that function?</p>
  
  <p>I was thinking of using debug_backtrace .. but that does not look as an elegant way to do it, and they also enumarate other reasons in another question <a href="https://stackoverflow.com/questions/346703/php-debugbacktrace-in-production-code">here</a> </p>
  
  <p>So what other alternatives are there ?</p>
  
  <p>thanks a lot</p>