Req #77307 [Com]: $_SERVER['REQUEST_HRTIME_INTEGER']
| From: | spam2 at rhsoft dot net | Date: | Mon, 17 Dec 2018 11:22:49 +0000 |
| Subject: | Req #77307 [Com]: $_SERVER['REQUEST_HRTIME_INTEGER'] | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-218483@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77307&edit=1
ID: 77307
Comment by: spam2 at rhsoft dot net
Reported by: bugzilla77 at gmail dot com
Summary: $_SERVER['REQUEST_HRTIME_INTEGER']
Status: Open
Type: Feature/Change Request
Package: Date/time related
Operating System: *
PHP Version: 7.3.0
Block user comment: N
Private report: N
New Comment:
do you realize that this values are not from php at all but from the webserver?
it is not the script start but when the request arrived at the webserver, easily to see when you use
your own startup value at the begin of the application and so you can even measure how expensive php
initialization is
Previous Comments:
------------------------------------------------------------------------
[2018-12-17 10:57:32] bugzilla77 at gmail dot com
REQUEST_HRTIME_FLOAT -> REQUEST_HRTIME_INTEGER
------------------------------------------------------------------------
[2018-12-17 07:54:51] bugzilla77 at gmail dot com
Description:
------------
Please add to $_SERVER array:
key: REQUEST_HRTIME_FLOAT
value: hrtime(true)
Test script:
---------------
<?php
// PHP 7.2
// ... page
// ... code
$elapsed=$_SERVER['REQUEST_TIME_FLOAT']-microtime(true);
?>
<?php
// PHP 7.3
// ... page
// ... code
$elapsed=$_SERVER['REQUEST_HRTIME_FLOAT']-hrtime(true);
?>
Expected result:
----------------
$_SERVER['REQUEST_HRTIME_FLOAT'] returns hrtime(true) of script start
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77307&edit=1