php測試耗時

$t1 = microtime(true);
//代碼
            $t2 = microtime(true);
            echo '耗時'.round($t2-$t1,3).'秒<br>';
            echo 'Now memory_get_usage: ' . memory_get_usage() . '<br />';
            exit();

 $__start__ = microtime( true );
    /***
        original benchmark script code here
    ***/
    fprintf( STDERR, microtime( true ) - $__start__);

來源:php

https://www.cnblogs.com/zqifa/p/php-19.htmlhtml

相關文章
相關標籤/搜索