- microtime: documentation ( source)
- preg_match: documentation ( source)
- range: documentation ( source)
<?php
$begin = microtime(TRUE);
foreach(range(1, 10) as $i) {
echo preg_match("/偷拍/", '站和主要商业网站偷拍要树立正确办网导');
}
$end = microtime(TRUE);
echo (($end-$begin)*1000).'ms ';