fastest way to remove whitespace from a rendered PHP file
<p>I tried a performance check tool "DOM Monster" to analyze my php site. There is one information which says "50% of nodes are whitespace-only text nodes".
Ok I unterstand the problem but what is the fastest way to cleanup whitespace in php?</p>

<p>I think a good start is to use the "Output Control" like ob_start() and then replace the whitespace before releasing it with ob_end_flush(). In the moment I do everything with echo echo ... I never read much about this ob_* things is it useful?</p>

<p>I guess using preg_replace() is a performance killer for this job or?
So what is the best practice for this?</p>
