- ob_start: documentation ( source)
- microtime: documentation ( source)
- ob_end_clean: documentation ( source)
<?php
ob_start();
$time = microtime(1);
$i = 0;
while($i++ < 100000) echo'this is a test that tests only comma vs dot-concatenation... Which is the fastest?','this is a test that tests only comma vs dot-concatenation... Which is the fastest?','this is a test that tests only comma vs dot-concatenation... Which is the fastest?','this is a test that tests only comma vs dot-concatenation... Which is the fastest?';
ob_end_clean();
echo (microtime(1)-$time)*1000, " milliseconds for commas";
echo "\n";
ob_start();
$time = microtime(1);
$i = 0;
while($i++ < 100000) echo'this is a test that tests only comma vs dot-concatenation... Which is the fastest?'.'this is a test that tests only comma vs dot-concatenation... Which is the fastest?'.'this is a test that tests only comma vs dot-concatenation... Which is the fastest?'.'this is a test that tests only comma vs dot-concatenation... Which is the fastest?';
ob_end_clean();
echo (microtime(1)-$time)*1000, " milliseconds for dots";