title: Outputting data with ob_flush produces notice
body: <p>I have a script that takes around 400s to complete. I am also currently using this function to output logs as the script loops through certain tasks.</p>
  
  <pre><code>function CLI_LOG($message){
      echo $message."\n";
      ob_end_flush(); 
      ob_flush(); 
      flush(); 
      ob_start(); 
  }
  </code></pre>
  
  <p>And at the top of my <code>script.php</code> I have <code>ob_start();</code></p>
  
  <p>This works fine in the browser! Although when I run it on the command line using</p>
  
  <p><code>php -f script.php</code> </p>
  
  <p>Every time I use the function I receive these two errors</p>
  
  <p><code>Notice: ob_flush(): failed to flush buffer. No buffer to flush in script.php on line 127</code></p>
  
  <p><code>PHP Notice:  ob_flush(): failed to flush buffer. No buffer to flush in script.php on line 127</code></p>
  
  <p>The line 127 holds this piece of code</p>
  
  <p><code>ob_flush();</code></p>
  
  <p>I have even tried to suppress these errors using both <code>error_reporting(0);</code> and <code>error_reporting(E_ALL &amp; ~E_NOTICE);</code> with no luck? </p>