This article mainly shares with you the PHP printing call function entry address (stack). It mainly explains it to you with a small piece of code. I hope it can help you.
private function print_stack_trace() { $array = debug_backtrace(); //print_r($array);//信息很齐全 unset($array[0]); foreach ($array as $row) { $html .= $row['file'] . ':' . $row['line'] . '行,调用方法:' . $row['function'] . "
"; } } Return $html; }
Related recommendations:
PHP prints the calling function entry address (stack) for easy debugging
The above is the detailed content of PHP implements printing the entry address of the calling function. For more information, please follow other related articles on the PHP Chinese website!