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

相关文章
相关标签/搜索