<?php
$max = 100000;
$output = '';
ob_start();
$starttime = microtime(true);
for ($i = 0; $i < $max; $i++) {
echo "$i $i $i $i $i $i $i $i $i $i";
}
$output .= 'Test one: ' . (microtime(true) - $starttime) . 's' . PHP_EOL;
$starttime = microtime(true);
for ($i = 0; $i < $max; $i++) {
echo $i . ' ' . $i . ' ' . $i . ' ' . $i . ' ' . $i . ' ' . $i . ' ' . $i . ' ' . $i . ' ' . $i . ' ' . $i;
}
$output .= 'Test two: ' . (microtime(true) - $starttime) . 's' . PHP_EOL;
ob_end_clean();
echo $output;