Output calling function information in PHP
<p>Consider this code : </p>

<pre><code>class App {
    public static function log($msg) {
    echo $msg;
    //echo WHAT_CLASS_CALLED_LOG;
    //echo WHAT_LINE_CALLED_LOG;
}
}


class Tester {
public function Make() {
    App::log('test');
}
}


$obj = new Tester();
$obj-&gt;Make();
</code></pre>

<p>Is is possible to get the class name and the function name of the calling function in the log method ? ( without explicitly sending them to the log function )</p>

<p>PS : I think trigger_error works like that behind the curtains so I was wondering If I can achieve this.</p>
