- microtime: documentation ( source)
<?php
function somefunc() { return 'somestring'; }
$time = microtime(1);
$i = 0;
while($i++ < 1000000) echo'somestring',somefunc(),'somestring';
echo (microtime(1)-$time)." seconds for commas";
echo "\n";
$time = microtime(1);
$i = 0;
while($i++ < 1000000) echo'somestring'.somefunc().'somestring';
echo (microtime(1)-$time)." seconds for dot";