What are some potential pitfalls of using PHP output buffering for immediate display?

One potential pitfall of using PHP output buffering for immediate display is that it can lead to increased memory usage, especially if large amounts of data are being buffered. To mitigate this issue, you can use the ob_implicit_flush() function to immediately flush the output buffer to the client.

<?php
ob_start();
// your code here

// immediately flush the output buffer
ob_end_flush();
?>