\n";
$time1 = microtime(true);
echo preg_replace ($search2, $replace, $string1) . "
\n";
$time2 = microtime(true);
echo "str_replace duration (ms): " . number_format($time1 - $time, 8, '.', '') . "
\n";
echo "preg_replace duration (ms): " . number_format($time2 - $time1, 8, '.', '') . "
\n";
?>