PHP debug_print_backtrace() Funktion
Beispiel
Drucken Sie einen PHP-Backtrace:
<?php
function a($txt) {
b("Glenn");
}
function b($txt) {
c("Cleveland");
}
function c($txt) {
debug_print_backtrace();
}
a("Peter");
?>
Definition und Verwendung
Die Funktion debug_print_backtrace() druckt einen PHP-Backtrace.
Diese Funktion zeigt Daten aus dem Code an, der zur Funktion debug_print_backtrace() geführt hat.
Syntax
debug_print_backtrace(options, limit);
Parameterwerte
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 |
Technische Details
Rückgabewert: | Keiner |
---|---|
PHP-Version: | 5.0+ |
PHP-Änderungsprotokoll: | PHP 5.4: Der optionale Parameter limit wurde hinzugefügt PHP 5.3.6: Der optionale Parameter options wurde hinzugefügt |
PHP-Fehlerreferenz