Edit report at https://bugs.php.net/bug.php?id=63957&edit=1

 ID:                 63957
 Comment 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:

Maybe PHP should set the $_SERVER['REQUEST_TIME_FLOAT'] value

to

MIN of apr_time_as_msec() , microtime(true) ???????


Previous Comments:
------------------------------------------------------------------------
[2013-01-14 01:40:33] ahar...@php.net

I can't reproduce this very reliably on either branch, so I don't think it's 
version specific as such.

Changing $_SERVER['REQUEST_TIME_FLOAT'] to be microtime(true) on startup misses 
the point of what the server variable represents: it's what the Web server 
believes the request time to be, not when the PHP interpreter was invoked.

If you want microtime(true), then set a variable to that at the top of your 
script.

------------------------------------------------------------------------
[2013-01-11 09:23:27] bugzilla77 at gmail dot com

Why this problem is not found in PHP 5.4?

------------------------------------------------------------------------
[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] ahar...@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

Reply via email to