PHP의 debug_print_backtrace() 함수는 역추적을 표시합니다. 값을 반환하지 않습니다.
구문
debug_print_backtrace(options, limit)
매개변수
-
옵션 - 아래 주어진 옵션에 대한 비트마스크
- DEBUG_BACKTRACE_IGNORE_ARGS:메모리 절약을 위해 "args" 인덱스와 모든 함수/메서드 인수를 생략할지 여부입니다.
-
한도 − 인쇄되는 스택 프레임 수를 제한합니다.
반환
debug_print_backtrace() 함수는 값을 반환하지 않습니다.
예시
다음은 예입니다 -
<?php
function Test1() {
Test2();
}
function Test2() {
Test3();
}
function Test3() {
Test4();
}
function Test4() {
debug_print_backtrace();
}
Test1();
?> 출력
Hi: helloarray(1) {
[0]=>
array(4) {
["file"]=>
string(30) "/home/cg/root/4127336/main.php"
["line"]=>
int(7)
["function"]=>
string(7) "display"
["args"]=>
array(1) {
[0]=>
string(5)
"hello"
}
}
}