私は本当に正規表現などの速度をテストしたいと思っていましたが、php.netには次の例があります:
$time_start = microtime(true);
// Sleep for a while
usleep(100); // Or anything for that matter..
$time_end = microtime(true);
$time = $time_end - $time_start;
echo "Did nothing in $time seconds\n";
編集: 私が意味したのは、usleep() の代わりに関数の大規模なループを再生することでした。常に 1 未満の非常に乱数が表示されます。ベンチマークに値するものは何も表示されません!