# Output Buffering Control

# Introduction

The Output Control functions allow you to control when output is sent from the script. This can be useful in several different situations, especially if you need to send headers to the browser after your script has begun outputting data. The Output Control functions do not affect headers sent using header() or setcookie(), only functions such as echo and data between blocks of PHP code.

- Installing/Configuring
  - Runtime Configuration
- Predefined Constants
- Output Buffering
- Flushing System Buffers
- User-Level Output Buffers
  - What Output Is Buffered?
  - Nesting Output Buffers
  - Buffer Size
  - Operations Allowed On Buffers
  - Output Handlers
  - Working With Output Handlers
  - Flags Passed To Output Handlers
  - Output Handler Return Values
- Examples
  - Basic usage
  - Output rewrite usage
- Output Control Functions
  - flush — Flush system output buffer
  - ob_clean — Clean (erase) the contents of the active output buffer
  - ob_end_clean — Clean (erase) the contents of the active output buffer and turn it off
  - ob_end_flush — Flush (send) the return value of the active output handler and turn the active output buffer off
  - ob_flush — Flush (send) the return value of the active output handler
  - ob_get_clean — Get the contents of the active output buffer and turn it off
  - ob_get_contents — Return the contents of the output buffer
  - ob_get_flush — Flush (send) the return value of the active output handler, return the contents of the active output buffer and turn it off
  - ob_get_length — Return the length of the output buffer
  - ob_get_level — Return the nesting level of the output buffering mechanism
  - ob_get_status — Get status of output buffers
  - ob_implicit_flush — Turn implicit flush on/off
  - ob_list_handlers — List all output handlers in use
  - ob_start — Turn on output buffering
  - output_add_rewrite_var — Add URL rewriter values
  - output_reset_rewrite_vars — Reset URL rewriter values

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open