Does PHP create output buffer for anonymous function?
<p>I wonder what happens in the following code:</p>

<pre><code>&lt;?php
function CountUp($count2, $count1)
{
    $count1(); // Say one
    $count2(); // Say two
}

CountUp(function() {
?&gt;
    Two
&lt;?php
}, function() {
?&gt;
    One
&lt;?
});
</code></pre>

<p>Apparently PHP creates an output buffer for the anonymous functions and flushes that buffer when we call them.</p>

<p>The question is: is that expected PHP behavior? I would like to use this feature in my template engine so it must not be hackish and have unpredictable behavior.</p>
