Logo name

Practical PHP Programming:Output buffering

From IpbWiki

  • Currently5.00/5
Jump to: navigation, search

Output Buffering was introduced in PHP 4, so is not new in PHP by a long shot, and yet it still has yet to catch on amongst the masses despite the added flexibility it brings.

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
  • Output compression


Chapter contents


Next: Practical_PHP_Programming:Advantages of output buffering

This page was last modified on 20 October 2006, at 12:34.  This page has been accessed 1,927 times.  Content is available under GNU Free Documentation License 1.2Disclaimers