Edit report at https://bugs.php.net/bug.php?id=63957&edit=1
ID: 63957
User updated by: bugzilla77 at gmail dot com
Reported by: bugzilla77 at gmail dot com
Summary: REQUEST_TIME_FLOAT too high
Status: Wont fix
Type: Bug
Package: *Web Server problem
Operating System: win32, apache module
PHP Version: 5.5.0alpha2
Block user comment: N
Private report: N
New Comment:
Why this problem is not found in PHP 5.4?
Previous Comments:
------------------------------------------------------------------------
[2013-01-11 09:21:20] bugzilla77 at gmail dot com
Currently $_SERVER['REQUEST_TIME_FLOAT'] is useless in determining the time of
generating web pages.
I think that PHP should setting $_SERVER['REQUEST_TIME_FLOAT'] = microtime(true)
on PHP's request handling.
------------------------------------------------------------------------
[2013-01-11 00:36:15] aharvey@php.net
microtime() and $_SERVER['REQUEST_TIME_FLOAT'] use different mechanisms to get the time:
microtime() calls gettimeofday() internally, whereas $_SERVER['REQUEST_TIME_FLOAT'] uses
whatever method the SAPI provides to get the request time (for instance, the apache2handler SAPI
calls apr_time_as_msec()). In practice, there are likely to be slight variances between the two
methods, since they do different things.
I don't see a sensible way we could change this without removing the semantics of
$_SERVER['REQUEST_TIME_FLOAT'] actually being the server's request time (as opposed
to just the startup time of PHP's request handling).
Marking won't fix.
------------------------------------------------------------------------
[2013-01-10 10:28:44] bugzilla77 at gmail dot com
Description:
------------
$_SERVER['REQUEST_TIME_FLOAT']
is greater than
microtime(true)
introduced in PHP 5.5 alpha (1-3)
Test script:
---------------
<?=$_SERVER['REQUEST_TIME_FLOAT']-microtime(true)?>
Expected result:
----------------
positive float (PHP 5.4 OK)
Actual result:
--------------
negative float
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63957&edit=1