微时间在php中的工作原理
PHP mico time,我想使用microtime处理我的应用程序,我认为PHP5的脚本示例非常简单微时间在php中的工作原理,php,Php,PHP mico time,我想使用microtime处理我的应用程序,我认为PHP5的脚本示例非常简单 <?php // Put this at the start of your script $time_start = microtime(true); // This is where your script should be executing, // but instead, we sleep for a while usleep(100); // Calculation
<?php
// Put this at the start of your script
$time_start = microtime(true);
// This is where your script should be executing,
// but instead, we sleep for a while
usleep(100);
// Calculation at the end of the script
$time_end = microtime(true);
$time = $time_end - $time_start;
// Do something with the results
echo "Did nothing in $time seconds\n";
?>
我认为PHP5的脚本示例非常简单
<?php
// Put this at the start of your script
$time_start = microtime(true);
// This is where your script should be executing,
// but instead, we sleep for a while
usleep(100);
// Calculation at the end of the script
$time_end = microtime(true);
$time = $time_end - $time_start;
// Do something with the results
echo "Did nothing in $time seconds\n";
?>
处理我的应用程序是什么意思?我认为psr123是在谈论应用程序评测。XDebug将在调试和评测应用程序方面为您提供很多帮助。什么是处理我的应用程序?我认为psr123是在谈论应用程序评测。XDebug将在调试和分析应用程序方面为您提供很大帮助。