プログラム実行処理時間を計測して表示する

デバッグ

 閲覧数:1265  投稿日:2020-06-22  更新日:2020-06-22  

プログラム実行処理時間を計測して表示する


コード

$executionStartTime = microtime(true);

//計測したいプログラム処理

$executionTime = microtime(true) - $executionStartTime;
echo "処理時間:".sprintf("%.20f", $executionTime)."秒"; //処理時間:0.00000691413879394531秒



結果

処理時間:0.00000691413879394531秒



タグ


microtime 





var_export内容をテキストファイル出力