Fonction PHP debug_print_backtrace()
Exemple
Imprimez une trace PHP :
<?php
function a($txt) {
b("Glenn");
}
function b($txt) {
c("Cleveland");
}
function c($txt) {
debug_print_backtrace();
}
a("Peter");
?>
Définition et utilisation
La fonction debug_print_backtrace() imprime une trace PHP.
Cette fonction affiche les données du code qui a conduit à la fonction debug_print_backtrace().
Syntaxe
debug_print_backtrace(options, limit);
Valeurs des paramètres
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 |
Détails techniques
Valeur de retour : | Rien |
---|---|
Version PHP : | 5.0+ |
Journal des modifications PHP : | PHP 5.4 : Le paramètre optionnel limit a été ajouté PHP 5.3.6 : Le paramètre optionnel options a été ajouté |
Référence des erreurs PHP