- ob_start: documentation ( source)
- microtime: documentation ( source)
- ob_end_clean: documentation ( source)
<?php
ob_start();
$time = microtime(1);
$i = 0;
while ($i++ < 10000) echo'aaaaaaa'.'aaaaaaa'.'aaaaaaa'.'aaaaaaa';
$end = microtime(1);
ob_end_clean();
echo "period took ".($end-$time);
echo "\n";
ob_start();
$time = microtime(1);
$i = 0;
while ($i++ < 10000) echo'aaaaaaa','aaaaaaa','aaaaaaa','aaaaaaa';
$end = microtime(1);
ob_end_clean();
echo "comma took ".($end-$time);