UCE Docs / ob_start

Signature

void ob_start()

Parameters

return value : none

Starts a new output buffer. Subsequent print() output is captured into it instead of the response until you collect it with ob_get_close() (or discard it with ob_close()). Buffers nest: each ob_start() pushes another buffer onto the stack. Use it to render a fragment, post-process it, then emit the result.

Example

ob_start();
print("buffered text");
String captured = ob_get_close();
print("captured: ", captured, "\n");
Output
captured: buffered text