April 17, 2014

How to check parent function from the function called?

How to check parent function from the function called?

function backtrace($i=1){
$callers=debug_backtrace();
return $callers[$i]['function'];
}

Last updated: April 17, 2014