title: How can I remove sensitive data from the debug_backtrace function?
body: <p>I am using print_r(debug_backtrace(), true) to retrieve a string representation of the debug backtrace.  This works fine, as print_r handles recursion.</p>
  
  <p>When I tried to recursively iterate through the debug_backtrace() return array before turning it into a string it ran into recursion and never ended.</p>
  
  <p>Is there some simple way I can remove certain sensitive key/value pairs from the backtrace array?  Perhaps some way to turn the array to a string using print_r, then back to an array with the recursive locations changed to the string <em>RECURSION</em>, which I could the iterate through.</p>
  
  <p>I don't want to execute regular expressions on the string representation if possible.</p>