无涯教程-PHP错误处理函数 - debug_print_backtrace()

47 阅读1分钟

debug_print_backtrace() - 语法

void debug_print_backtrace ( void );

此函数打印PHP回溯。它打印函数调用、包含的/必需的文件和eval()内容。

debug_print_backtrace() - 示例

<?php
   function one() {
      two();
   }
   
   function two() {
      three();
   }
   
   function three(){
      debug_print_backtrace();
   }
   one();
?> 

这将产生以下输出-

/php/test.php:3]
#2 one() called at [/var/www/learnfk/php/test.php:13]

参考链接

www.learnfk.com/php/php-fun…