Função PHP debug_print_backtrace()
Exemplo
Imprima um backtrace PHP:
<?php
function a($txt) {
b("Glenn");
}
function b($txt) {
c("Cleveland");
}
function c($txt) {
debug_print_backtrace();
}
a("Peter");
?>
Definição e uso
A função debug_print_backtrace() imprime um backtrace PHP.
Essa função exibe dados do código que levou à função debug_print_backtrace().
Sintaxe
debug_print_backtrace(options, limit);
Valores de parâmetro
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 |
Detalhes técnicos
Valor de retorno: | Nenhum |
---|---|
Versão do PHP: | 5.0+ |
Registro de alterações do PHP: | PHP 5.4: O limite de parâmetros opcionais foi adicionado PHP 5.3.6: As opções de parâmetros opcionais foram adicionadas |
Referência de erro PHP