Hàm debug_print_backtrace () trong PHP
Thí dụ
In một backtrace PHP:
<?php
function a($txt) {
b("Glenn");
}
function b($txt) {
c("Cleveland");
}
function c($txt) {
debug_print_backtrace();
}
a("Peter");
?>
Định nghĩa và Cách sử dụng
Hàm debug_print_backtrace () in một dấu lùi 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ả lại: | Không có |
---|---|
Phiên bản PHP: | 5.0+ |
PHP Changelog: | PHP 5.4: Giới hạn tham số tùy chọn đã được thêm PHP 5.3.6: Các tùy chọn tham số tùy chọn đã được thêm vào |
Tham chiếu lỗi PHP