ob_start(); echo "This is some output"; $buffer = Horde\Util\Buffer::endBuffer(); echo "Buffered content: " . $buffer;
ob_start(); include "some_script.php"; $buffer = Horde\Util\Buffer::endBuffer(); echo "Buffered content: " . $buffer;In this example, we start output buffering, then include a separate PHP script using the `include` function. The output of that script is captured in the buffer, which is then terminated using `endBuffer()`. We then print the contents of the buffer, which will include any output generated by the included script. Package Library: Horde_Util.