The Problem When an error occurs in PHP and you want to understand the flow of program logic that occurred, it’s useful to be able to print the call stack — all the functions that were called up to this point.