非常简单,记录一下: $t1 = microtime(true); //php script here $t2 = microtime(true); echo (($t2-$1)*1000).'ms';