0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【PHP】シンプルな処理速度計測

Posted at

速度を計測したい処理を下記のように$start$endで挟む

$start = microtime(true);
    // 処理
$end = microtime(true);

echo '処理時間は' . ($end - $start) . '秒です。'

計測に使っているのはPHPの関数microtime()です。
引数にtrueを指定することで返却値をfloat型で受け取ることができます。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?