php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #33893 $_SERVER['STARTUP_MICRO_TIME']
Submitted: 2005-07-27 23:15 UTC Modified: 2010-12-22 03:43 UTC
From: marcos dot neves at gmail dot com Assigned: johannes (profile)
Status: Closed Package: *General Issues
PHP Version: 5.1.0b3 OS: any
Private report: No CVE-ID: None
 [2005-07-27 23:15 UTC] marcos dot neves at gmail dot com
Description:
------------
$_SERVER['REQUEST_TIME'] is a very nice feature, But since many scripts runs in less than 0.1 seconds, would be nice exists a $_SERVER['STARTUP_MICRO_TIME'], so would be possible do something like below:

Reproduce code:
---------------
<?
$times['startup'] = $_SERVER['STARTUP_MICRO_TIME']

require_once 'any.php';

$times['require'] = microtime(true);

... // more code

$times['more_code'] = microtime(true);

printTimes($times);

function printTimes($times) {
... // use $_SERVER['REQUEST_MICRO_TIME']
}

?>

Expected result:
----------------
A fine grained time elapse calculation

Actual result:
--------------
not perfect time elapse calculation

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-22 03:43 UTC] johannes@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: johannes
 [2010-12-22 03:43 UTC] johannes@php.net
In PHP trunk $_SERVER['REQUEST_TIME'] contains microsecond precision.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC