- microtime: documentation ( source)
- str_repeat: documentation ( source)
- printf: documentation ( source)
<?php
$x = str_repeat('foo', 500000);
$y = 'bar';
$before = microtime(1);
$x = $x . $y;
printf('%f'."\n", microtime(1) - $before);
$x = str_repeat('foo', 500000);
$y = 'bar';
$before = microtime(1);
$x .= $y;
printf('%f'."\n", microtime(1) - $before);