PHP debug_print_backtrace() Fungsi
Contoh
Cetak backtrace PHP:
<?php
function a($txt) {
b("Glenn");
}
function b($txt) {
c("Cleveland");
}
function c($txt) {
debug_print_backtrace();
}
a("Peter");
?>
Definisi dan Penggunaan
Fungsi debug_print_backtrace() mencetak backtrace PHP.
Fungsi ini menampilkan data dari kode yang mengarah ke fungsi debug_print_backtrace().
Sintaksis
debug_print_backtrace(options, limit);
Nilai Parameter
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 |
Detail Teknis
Nilai Kembali: | Tidak ada |
---|---|
Versi PHP: | 5.0+ |
Log Perubahan PHP: | PHP 5.4: Batas parameter opsional telah ditambahkan PHP 5.3.6: Opsi parameter opsional telah ditambahkan |
Referensi Kesalahan PHP