Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
微时间在php中的工作原理_Php - Fatal编程技术网

微时间在php中的工作原理

微时间在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 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 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将在调试和分析应用程序方面为您提供很大帮助。