PHP

PHP stack trace

Tracking down an error in PHP code often requires knowledge about how the function is being called.  In cases such as this a stack trace is often useful to show the call stack.  PHP has a function debug_backtrace() that I have found useful in displaying the call stack.  But it seems to use a lot of resources.  So I wanted to quantify this and try a new approach that I have been using lately.  I used something in Drupal 8 that I was debugging.  Results will differ greatly depending on the case but the overall trends should be similar.  I used