PHP debug_print_backtrace()関数
例
PHPバックトレースを出力します。
<?php
function a($txt) {
b("Glenn");
}
function b($txt) {
c("Cleveland");
}
function c($txt) {
debug_print_backtrace();
}
a("Peter");
?>
定義と使用法
debug_print_backtrace()関数は、PHPバックトレースを出力します。
この関数は、debug_print_backtrace()関数に至るまでのコードからのデータを表示します。
構文
debug_print_backtrace(options, limit);
パラメータ値
Parameter | Description |
---|---|
options | Optional. Specifies a bitmask for the following option: DEBUG_BACKTRACE_IGNORE_ARGS (Whether or not to omit the "args" index, and all the function/method arguments, to save memory) |
limit | Optional. Limits the number of stack frames printed. By default (limit=0) it prints all stack frames |
技術的な詳細
戻り値: | なし |
---|---|
PHPバージョン: | 5.0以降 |
PHP変更ログ: | PHP 5.4:オプションのパラメーター制限が追加されました PHP 5.3.6:オプションのパラメーターオプションが追加されました |
PHPエラーリファレンス