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:
...and I use Apache VC10
PHP as php5apache2_4.dll from php package.
Previous Comments:
------------------------------------------------------------------------
[2013-03-07 08:35:07] bugzilla77 at gmail dot com
I use
Apache 2.4.3 from www.apachelounge.com
or
Apache 2.2.21 from www.apachelounge.com
The problem is only on php 5.5. Php 5.4 no problems.
I will download Apache 2.4.4 from www.apachelounge.com.
But I do not think it's something to help because php 5.4 not affected.
------------------------------------------------------------------------
[2013-03-07 08:12:29] ab@php.net
Which apache build are you using? Please try 2.4.4 from here http://www.apachelounge.com/download/additional/
. Also, is the behavior the same in the CLI?
------------------------------------------------------------------------
[2013-03-07 07:45:38] bugzilla77 at gmail dot com
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.
------------------------------------------------------------------------
[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