Bug #64370 [Com]: microtime(true) corrupted
| From: | bugzilla77 at gmail dot com | Date: | Thu, 07 Mar 2013 07:45:38 +0000 |
| Subject: | Bug #64370 [Com]: microtime(true) corrupted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-177634@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64370&edit=1
ID: 64370
Comment by: bugzilla77 at gmail dot com
Reported by: bugzilla77 at gmail dot com
Summary: microtime(true) corrupted
Status: Assigned
Type: Bug
Package: Date/time related
Operating System: win 7 (32/64)
PHP Version: 5.5.0alpha5
Assigned To: ab
Block user comment: N
Private report: N
New Comment:
The difference is not constant. It grows in proportion to the time since the last
restart Apache. At the beginning it is a few milliseconds. After a few days up to
several seconds.
Previous Comments:
------------------------------------------------------------------------
[2013-03-07 06:56:22] pajoye@php.net
@a can you take a look please?
------------------------------------------------------------------------
[2013-03-06 15:45:36] bugzilla77 at gmail dot com
Description:
------------
microtime(true) returns value less than time() (or $_SERVER['REQUEST_TIME'] or
$_SERVER['REQUEST_TIME_FLOAT'])
up to a DOZEN seconds!!!
live demo: http://pulsmedica.com.pl/microtime.php
win 7 32bit
apache 2.4.3 + php5apache2_4.dll
php 5.5a5 ts
Test script:
---------------
$_SERVER['REQUEST_TIME']: <?=$_SERVER['REQUEST_TIME']?><br/>
$_SERVER['REQUEST_TIME_FLOAT']:
<?=$_SERVER['REQUEST_TIME_FLOAT']?><br/>
time(): <?=time()?><br/>
microtime(true): <?=microtime(true)?><br/><br/>
PHP <?=PHP_VERSION?><br/>
created in <?=(microtime(true)-$_SERVER['REQUEST_TIME_FLOAT'])*1000?> ms
Expected result:
----------------
PHP 5.4: never problems
Actual result:
--------------
PHP 5.5 live demo: http://pulsmedica.com.pl/microtime.php
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64370&edit=1