UCE Docs / ob_close

Signature

void ob_close()

Parameters

return value : none

Discards the current output buffer and its contents, switching back to the previous buffer on the stack. Use it when you captured output only to throw it away (e.g. rendering for a side effect).

Example

ob_start();
print("this output is discarded");
ob_close();
print("the buffered text never reached the response\n");
Output
the buffered text never reached the response