Introduction to PHP Output Buffering
March 2nd, 2009 by MattDevTips has just introduced me, in a fairly recent article, to a PHP feature that I hadn’t been conciously aware of: Output Buffering. (Why hadn’t anybody told be about this before?)
Without output buffering (the default), your HTML is sent to the browser in pieces as PHP processes through your script. With output buffering, your HTML is stored in a variable and sent to the browser as one piece at the end of your script. Can you already begin to see the performance advantages and post processing opportunities?
The article covers the basic usage output buffering, and the pros and cons of using it. Definitely worth a look. I will have to look into this in depth sometime soon…
Output Buffering for Web Developers, a Beginner’s Guide
Twitter
Twitter[WSC] U.S. Patent Office Awards Amazon 1-Click Patent http://ntgo.us/12
Follow Matt on Twitter