Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<User-Level Output BuffersNesting Output Buffers>
^User-Level Output BuffersLast updated: Mon, 26 Oct 2026

What Output Is Buffered?

PHP's user-level output buffers buffer all output after they are started until they are turned off or the script ends. Output in the context of PHP's user-level output buffer is everything that PHP would display or send back to the browser. In practical terms, output is non-zero length data that is:

Note:

Data that is written directly to stdout or passed to an SAPI function with a similar functionality will not be captured by user-level output buffers. This includes writing data to stdout with fwrite() or sending headers using header() or setcookie().


<User-Level Output BuffersNesting Output Buffers>
^User-Level Output BuffersLast updated: Mon, 26 Oct 2026