<?php
$result = [
'bufferOff' => 0,
'bufferOn' => 0
];
$startTime = microtime(true);
testEcho();
$result['bufferOff'] = microtime(true) - $startTime;
$startTime = microtime(true);
ob_start();
testEcho();
ob_end_clean();
$result['bufferOn'] = microtime(true) - $startTime;
echo PHP_EOL;
print_r($result);
function testEcho() {
for ($i = 0; $i <= 10000; $i++) {
echo 'aaaaaaaaa';
}
}