Consider this 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->Make();
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 )
PS : I think trigger_error works like that behind the curtains so I was wondering If I can achieve this.