Untitled
public text v1 · immutable<?
$regex = "\"/^(?:rc|runecraft)(?:ing)?$/i\"";
$text = "\"rc\"";
$i = 1;
$j = 16384;
$start = microtime();
$match = "";
while ($i < $j) {
$match = preg_match($regex, $text);
$i++;
//echo 'preg_match('.$regex.', '.$text.')';
}
$end = microtime(); $dur = $end - $start;
$dura = $j / ($dur / 1000000);
echo "regex matches done in ".$dur." miliseconds: ".$dura." matches per second";
?>