Check if part of output has already been sent in PHP
<p>In PHP, is there a (ready-made) way to check if a part of the output has already been sent to the client?</p>

<p>I know that with <code>headers_sent()</code> you can check if the headers have already been sent, but I also want to check if <strong>any output</strong> has been sent (so that e.g. the HTTP header <code>Content-Length</code> > 0).</p>

<p><em>(Notice that</em> <code>ob_start()</code> <em>starts output buffering from the moment when it is called. But third-party systems implementing my code might already have sent output, thus output buffering is unusable as far as I know.)</em></p>
