title: In PHP - benefit of returning content by 'ob_get_clean()' as compared to 'return'?
body: <p>What's the benefit of returning content by 'ob_get_clean()' as compared to simple 'return'?  Although 'doSomething()' will work in a different way either 'return or echo'. What's the benefit of using one approach over the other.</p>
  
  <p>For e.g</p>
  
  <pre><code>ob_start();
  $this-&gt;doSomething();
  ob_get_clean();
  </code></pre>
  
  <p>---  as compared to ---</p>
  
  <pre><code>return $this-&gt;doSomething();
  </code></pre>