PHP debug_print_backtrace ()ฟังก์ชั่น
ตัวอย่าง
พิมพ์ 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 backtrace
ฟังก์ชันนี้แสดงข้อมูลจากโค้ดที่นำไปสู่ฟังก์ชัน 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