I'm wondering if it's possible to override the echo command in PHP so that I could easily string replace new lines with nothing to compress the HTML drawn from the php process. Something like:
class echo($SomeVar){echo str_replace('\n','',$SomeVar);}
I've got no idea how to override a method or class in PHP like I can do with objective-c for example.
I'd just like to "re-echo" every single echo command on the site and compress all the line breaks from my code.
Rather than create a new custom "echo2" method and re-edit the entire site I thought I'd try a simple patch for the real echo command in php first.
Anyone done this?
Thanks in Advance!