F.27. Output Buffering

FunctionReturnsDescription
ob_list_handlers()
false|arrayLists all output_buffers in an array.
ob_start([ string|array user_function [, int chunk_size [, bool erase]]])
boolTurns on Output Buffering (specifying an optional output handler).
ob_flush(void)
boolFlushes (sends) contents of the output buffer. The last buffer content is sent to next buffer.
ob_clean(void)
boolCleans (deletes) the current output buffer.
ob_end_flush(void)
boolFlushes (sends) the output buffer, and deletes current output buffer.
ob_end_clean(void)
boolCleans the output buffer, and deletes current output buffer.
ob_get_flush(void)
boolGets current buffer contents, flushes (sends) the output buffer, and deletes current output buffer.
ob_get_clean(void)
boolGets current buffer contents and deletes current output buffer.
ob_get_contents(void)
stringReturns the contents of the output buffer.
ob_get_level(void)
intReturns the nesting level of the output buffer.
ob_get_length(void)
intReturns the length of the output buffer.
ob_get_status([bool full_status])
false|arrayReturns the status of the active or all output buffers.
ob_implicit_flush([int flag])
voidTurns implicit flush on/off and is equivalent to calling flush() after every output call.
output_reset_rewrite_vars(void)
boolResets (clears) URL rewriter values.
output_add_rewrite_var(string name, string value)
boolAdds URL rewriter values.

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.