While programming in PHP often you will find that a simple echo or log statement is not sufficient. Bien que la programmation en PHP souvent, vous trouverez qu'une simple écho ou se connecter déclaration n'est pas suffisante. You have found out where a problem is happening but you have no clue why it is executing that code in the first place. Vous avez trouvé un endroit où un problème qui se passe, mais vous n'avez pas la moindre idée de pourquoi il exécute ce code en premier lieu. This is where execution path comes in handy. C'est là que l'exécution chemin est très pratique. With a simple call you can display the whole execution path of the code so far, every function that was executed, in which file and in which line number. Avec un simple appel vous pouvez afficher l'ensemble du chemin d'exécution du code à ce jour, toutes les fonctions qui a été exécuté, dans quel fichier et dans laquelle le numéro de ligne. Isn’t that handy? N'est-ce pas à portée de main?

Use debug_print_backtrace() to print the full execution path of the code upto that point. Utilisez debug_print_backtrace () pour imprimer le chemin pleine exécution du code jusqu'à ce point. You can also use debug_backtrace() which returns an associative array with the following data: Vous pouvez également utiliser debug_backtrace () qui retourne un tableau associatif avec les données suivantes:
Possible returned elements from debug_backtrace() Éléments possibles de debug_backtrace ()

Name Nom Type Description
function fonction string chaîne

The current function name. L'actuel nom de fonction. See also Voir aussi
__FUNCTION__.

line ligne integer entier The current line number. L'actuel numéro de ligne. See also Voir aussi
__LINE__.
file fichier string chaîne The current file name. Le nom de fichier actuel. See also Voir aussi
__FILE__.
class classe string chaîne

The current class name. Le nom de classe actuelle. See also Voir aussi
__CLASS__

type string chaîne The current call type. Le type d'appel actuel. If a method call, “->” is returned. Si un appel de méthode, "->" est de retour. If a static Si un statique
method call, “::” is returned. appel de méthode, ":" est de retour. If a function call, nothing is returned. Si un appel de fonction, rien n'est renvoyé.
args array tableau

If inside a function, this lists the functions arguments. Si l'intérieur d'une fonction, cette liste des fonctions arguments. If Si
inside an included file, this lists the included file name(s). inclus dans un fichier, cette liste comprenait le nom de fichier (s).