title: Which is faster: Output buffer or echo
body: <p>I'm writing a wordpress widget plugin. It should output some html code which should look like this</p>
  
  <pre><code>&lt;a href="link1"&gt;link1title&lt;/a&gt;
  &lt;a href="link2"&gt;link2title&lt;/a&gt;
  &lt;a href="link3"&gt;link3title&lt;/a&gt;
  &lt;a href="link4"&gt;link4title&lt;/a&gt;
  &lt;a href="link5"&gt;link5title&lt;/a&gt;
  </code></pre>
  
  <p>I'm running a for loop to output the links and titles from 2 arrays, and I can do that in two different ways:</p>
  
  <pre><code>&lt;?php for ($i = 0; $i &lt; $x; $i++)
      echo '&lt;a href="'.$links[$i].'"&gt;'.$titles[$i].'&lt;/a&gt;';
  ?&gt;
  </code></pre>
  
  <p>Or I can use something like this:</p>
  
  <pre><code>&lt;?php ob_start();
  for ($i = 0; $i &lt; $x; $i++) {?&gt;
      &lt;a href="&lt;?php echo $links[$i];?&gt;"&gt;&lt;?php echo $titles[$i];?&gt;&lt;/a&gt;
  &lt;?php ob_get_flush();?&gt;
  </code></pre>
  
  <p>The example is trivial. There is a lot more html code, and a lot more variables involved.
  Since there is a speed difference between printf and cout in c/c++, I was wondering is there a speed difference between using output buffer and echo.</p>
  
  <p>Also, which one is better to use?</p>