PHP debug_print_backtrace() Functie
Voorbeeld
Een PHP-backtrace afdrukken:
<?php
function a($txt) {
b("Glenn");
}
function b($txt) {
c("Cleveland");
}
function c($txt) {
debug_print_backtrace();
}
a("Peter");
?>
Definitie en gebruik
De functie debug_print_backtrace() drukt een PHP-backtrace af.
Deze functie geeft gegevens weer van de code die leidde tot de functie debug_print_backtrace().
Syntaxis
debug_print_backtrace(options, limit);
Parameterwaarden
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
Winstwaarde: | Geen |
---|---|
PHP-versie: | 5.0+ |
PHP-wijzigingslogboek: | PHP 5.4: De optionele parameterlimiet is toegevoegd PHP 5.3.6: De optionele parameteropties zijn toegevoegd |
PHP-foutreferentie