Hàm debug_print_backtrace() trong PHP
Ví dụ
In một vết ngược PHP:
<?php
function a($txt) {
b("Glenn");
}
function b($txt) {
c("Cleveland");
}
function c($txt) {
debug_print_backtrace();
}
a("Peter");
?>
Hãy tự mình thử »Định nghĩa và cách sử dụng
Hàm debug_print_backtrace() in vết ngược PHP.
Hàm này hiển thị dữ liệu từ mã dẫn đến hàm debug_print_backtrace().
Cú pháp
debug_print_backtrace( options , limit );
Giá trị tham số
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 |
Chi tiết kỹ thuật
Giá trị trả về: | Không có |
---|---|
Phiên bản PHP: | 5.0+ |
Nhật ký thay đổi PHP: | PHP 5.4: Đã thêm giới hạn tham số tùy chọn PHP 5.3.6: Đã thêm các tùy chọn tham số tùy chọn |
Tham chiếu lỗi PHP