现在的位置: 首页 > 综合 > 正文

PHP debug_print_backtrace() 函数

2013年11月22日 ⁄ 综合 ⁄ 共 486字 ⁄ 字号 评论关闭
文章目录

PHP debug_print_backtrace() 函数

PHP Error 和 Logging 函数

定义和用法

debug_print_backtrace() 函数输出 backtrace。

语法

debug_print_backtrace()

例子

<?php
function one($str1, $str2)
 {
 two("Glenn", "Quagmire");
 }
function two($str1, $str2)
 {
 three("Cleveland", "Brown");
 }
function three($str1, $str2)
 {
 debug_print_backtrace();
 }

one("Peter", "Griffin");
?>

输出:

#0 three(Cleveland, Brown) called at [C:\webfolder\test.php:8]
#1 two(Glenn, Quagmire) called at [C:\webfolder\test.php:4]
#2 one(Peter, Griffin) called at [C:\webfolder\test.php:15]

PHP Error 和 Logging 函数

抱歉!评论已关闭.