define('LOOP',1000000);
function f1() {
ob_start();
for($i=0; $i<LOOP; ++$i) {
echo '123456';
echo '123456';
echo '123456';
echo '123456';
echo '123456';
}
ob_end_clean();
}
function f2() {
ob_start();
for($i=0; $i<LOOP; ++$i) {
echo "123456";
echo "123456";
echo "123456";
echo "123456";
echo "123456";
}
ob_end_clean();
}
$start = microtime(true);
f1();
$stop = microtime(true);
$time1 = $stop - $start;
$start = microtime(true);
f2();
$stop = microtime(true);
$time2 = $stop - $start;
echo $time1 . "\t";
echo $time2 . "\n";