UCE Docs / ob_get

Signature

String ob_get()

Parameters

return value : the current buffer's contents

Returns the current output buffer's contents WITHOUT discarding the buffer, so more output can still be appended. Use ob_get_close() when you also want to pop the buffer.

Example

ob_start();
print("partial");
String snapshot = ob_get();
ob_close();
print("snapshot was: ", snapshot, "\n");
Output
snapshot was: partial