Mine
public text v1 · immutable<?
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$regex = "\"/^(?:rc|runecraft)(?:ing)?$/i\"";
$text = "\"rc\"";
$i = 1;
$j = 16384;
$start = microtime_float();
while ($i < $j) {
preg_match($regex, $text);
$i++;
}
$end = microtime_float();
$dur = $end - $start;
echo "regex matches done in ".$dur." seconds";
?>