title: Can I redirect all PRINT and ECHO output to a PHP function?
body: <p>I've inherited some ancient code to paw through and figure out what's happening.  Scattered throughout the spaghetti code are hundreds of echos and prints that are nearly impossible to follow.</p>
  
  <p>I've been researching and googling using variations of STDOUT, but can't find anything that doesn't talk about using and alternative to PRINT/ECHO.</p>
  
  <p>I'm looking for a way to effectively <em>replace</em> the PHP Echo/Print with my own function called something like "MyEcho" that will interrogate/log what's printing from where and when.</p>
  
  <p>Is there a way to do this, or must I write the function, and replace all print/echo used throughout the code? </p>