Without output buffering, PHP sends data to your web server as soon as it is ready - this might be line by line or code block by code block. Not only is this slow because of the need to send lots of little bits of data, but it also means you are restricted in the order you can send data. Output buffering cures these ills by enabling you to store up your output and send to send it when you are ready to - or to not send it at all, if you so decide.
Topics covered in this chapter are:
When to use output buffering
Manipulating multiple buffers
Incremental data flushing
Copyright ©2015 Paul Hudson. Follow me: @twostraws.