PHP debug_print_backtrace()関数
完全な PHP Error リファレンスマニュアル
定義と用法
debug_print_backtrace() 関数はバックトレースを出力します。
この関数は、debug_print_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");
?>
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:webfoldertest.php:8]
#1 two(Glenn, Quagmire) called at [C:webfoldertest.php:4]
#2 one(Peter, Griffin) called at [C:webfoldertest.php:15]
#1 two(Glenn, Quagmire) called at [C:webfoldertest.php:4]
#2 one(Peter, Griffin) called at [C:webfoldertest.php:15]
完全な PHP Error リファレンスマニュアル その他の拡張機能