Output Buffering

Noun · Development

Definitions

  1. A technique in which output destined for a stream (stdout, an HTTP response, a file) is accumulated in a memory buffer rather than being sent immediately, allowing the program to modify, measure, or discard the output before flushing it. PHP's `ob_start()`/`ob_flush()` is a classic example, but the concept applies to any buffered I/O layer.

    In plain English: Holding output in memory temporarily instead of sending it right away, so you can change or inspect it before it goes out.

    Example: "We enabled output buffering so we could capture the rendered HTML, calculate a Content-Length header, and then send it all at once."

Related Terms