#42226 [Opn->Fbk]: microtime is not save under windows

2007-08-08 Thread jani
 ID:   42226
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bjoern at xrow dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Date/time related
 Operating System: Windows
 PHP Version:  5.2.4RC1
 New Comment:

So this is PHP 4 only issue? Adjust the version field accordinly then.


Previous Comments:


[2007-08-07 13:04:35] bjoern at xrow dot de

Here is the script with the additional param. It works as expected.
Unfortunatelly php4 doesn`t have this param so this seems to be only a
workaround for php5.





[2007-08-07 12:51:49] [EMAIL PROTECTED]

Have you tried calling microtime(1) <-- this returns you a floating 
point number directly.



[2007-08-06 22:04:47] bjoern at xrow dot de

Description:

This bug occurs under php4 and php5.

It might occur that the micro time might output a date older then the
date it had output before.

php5 does worse then php4.

Reproduce code:
---


Expected result:

C:\workspace>php microtimebug.php
(nothing)
C:\workspace>C:\php5\php.exe microtimebug.php
(nothing)

Actual result:
--
C:\workspace>php microtimebug.php
Run 2690 Last:1186437375.2899 -Current:1186437374.2495
Run 23377 Last:1186437375.4714 -Current:1186437374.437
Run 30341 Last:1186437375.534 -Current:1186437374.4995
Run 36083 Last:1186437375.5787 -Current:1186437374.5464
Run 49990 Last:1186437375.6881 -Current:1186437374.6557
Run 62669 Last:1186437375.7984 -Current:1186437374.7651
Run 68143 Last:1186437375.8433 -Current:1186437374.7964
Run 75918 Last:1186437375.8971 -Current:1186437374.8745
Run 82398 Last:1186437375.9586 -Current:1186437374.9214
Run 90123 Last:1186437376.0163 -Current:1186437374.9839
Run 99605 Last:1186437376.0827 -Current:1186437375.062

C:\workspace>C:\php5\php.exe microtimebug.php
Run 11 Last:1186436769.93 -Current:1186436768.89
Run 260 Last:1186436769.96 -Current:1186436768.92
Run 998 Last:1186436770.04 -Current:1186436769
Run 1392 Last:1186436770.08 -Current:1186436769.05
Run 2180 Last:1186436770.17 -Current:1186436769.14
Run 3123 Last:1186436770.27 -Current:1186436769.25
Run 3657 Last:1186436770.34 -Current:1186436769.31
Run 4137 Last:1186436770.4 -Current:1186436769.36
Run 4514 Last:1186436770.44 -Current:1186436769.41
Run 4900 Last:1186436770.47 -Current:1186436769.45
Run 5317 Last:1186436770.53 -Current:1186436769.5
Run 5639 Last:1186436770.56 -Current:1186436769.53
Run 6138 Last:1186436770.62 -Current:1186436769.59
Run 6299 Last:1186436770.63 -Current:1186436769.61
Run 7112 Last:1186436770.73 -Current:1186436769.7
Run 7402 Last:1186436770.77 -Current:1186436769.73
Run 8066 Last:1186436770.85 -Current:1186436769.81
Run 8496 Last:1186436770.9 -Current:1186436769.86
Run 8904 Last:1186436770.94 -Current:1186436769.91
Run 9161 Last:1186436770.97 -Current:1186436769.94
Run 9971 Last:1186436771.07 -Current:1186436770.03
Run 10375 Last:1186436771.12 -Current:1186436770.08
Run 10738 Last:1186436771.16 -Current:1186436770.12
Run 10950 Last:1186436771.18 -Current:1186436770.14
Run 11612 Last:1186436771.26 -Current:1186436770.22
Run 11819 Last:1186436771.27 -Current:1186436770.25
Run 12361 Last:1186436771.33 -Current:1186436770.31
Run 12690 Last:1186436771.38 -Current:1186436770.34
Run 13394 Last:1186436771.46 -Current:1186436770.42
Run 13677 Last:1186436771.49 -Current:1186436770.45
Run 13728 Last:1186436771.5 -Current:1186436770.47
Run 14085 Last:1186436771.53 -Current:1186436770.5
Run 14553 Last:1186436771.58 -Current:1186436770.56
Run 14636 Last:1186436771.6 -Current:1186436770.56
Run 14978 Last:1186436771.65 -Current:1186436770.61
Run 15380 Last:1186436771.69 -Current:1186436770.66
Run 15750 Last:1186436771.73 -Current:1186436770.7
Run 16024 Last:1186436771.77 -Current:1186436770.73
Run 16719 Last:1186436771.84 -Current:1186436770.81
Run 17586 Last:1186436771.94 -Current:1186436770.91
Run 18366 Last:1186436772.03 -Current:1186436771
Run 18911 Last:1186436772.09 -Current:1186436771.06
Run 19178 Last:1186436772.13 -Current:1186436771.09
Run 19516 Last:1186436772.16 -Current:1186436771.12
Run 19743 Last:1186436772.19 -Current:1186436771.16
Run 20118 Last:1186436772.23 -Current:1186436771.19
Run 20527 Last:1186436772.27 -Current:1186436771.23
Run 21095 Last:1186436772.34 -Current:1186436771.31
Run 21526 Last:1186436772.39 -Current:1186436771.36
Run 22115 Last:1186436772.46 -Current:1186436771.42
Run 22320 Last:1186436772.49 -Current:1186436771.45
Run 23076 Last:1186436772.56 -Current:1186436771.53
Run 23278 Last:1186436772.6 -Current:1186436771.56
Run 23943 Last:1186436772.67 -Current:1186436771.64
Run 24733 Last:1186436772.75 -Current:1186436771.73
Run 25046 Last:1186436772.79 -Current:1186436771.77
Run 25635 Last:1186436772.87 -Current:1186436771.83
Run 25839 Last:1186436772.88 -

#42226 [Opn->Fbk]: microtime is not save under windows

2007-08-07 Thread iliaa
 ID:   42226
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bjoern at xrow dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Date/time related
 Operating System: Windows
 PHP Version:  5.2.4RC1
 New Comment:

Have you tried calling microtime(1) <-- this returns you a floating 
point number directly.


Previous Comments:


[2007-08-06 22:04:47] bjoern at xrow dot de

Description:

This bug occurs under php4 and php5.

It might occur that the micro time might output a date older then the
date it had output before.

php5 does worse then php4.

Reproduce code:
---


Expected result:

C:\workspace>php microtimebug.php
(nothing)
C:\workspace>C:\php5\php.exe microtimebug.php
(nothing)

Actual result:
--
C:\workspace>php microtimebug.php
Run 2690 Last:1186437375.2899 -Current:1186437374.2495
Run 23377 Last:1186437375.4714 -Current:1186437374.437
Run 30341 Last:1186437375.534 -Current:1186437374.4995
Run 36083 Last:1186437375.5787 -Current:1186437374.5464
Run 49990 Last:1186437375.6881 -Current:1186437374.6557
Run 62669 Last:1186437375.7984 -Current:1186437374.7651
Run 68143 Last:1186437375.8433 -Current:1186437374.7964
Run 75918 Last:1186437375.8971 -Current:1186437374.8745
Run 82398 Last:1186437375.9586 -Current:1186437374.9214
Run 90123 Last:1186437376.0163 -Current:1186437374.9839
Run 99605 Last:1186437376.0827 -Current:1186437375.062

C:\workspace>C:\php5\php.exe microtimebug.php
Run 11 Last:1186436769.93 -Current:1186436768.89
Run 260 Last:1186436769.96 -Current:1186436768.92
Run 998 Last:1186436770.04 -Current:1186436769
Run 1392 Last:1186436770.08 -Current:1186436769.05
Run 2180 Last:1186436770.17 -Current:1186436769.14
Run 3123 Last:1186436770.27 -Current:1186436769.25
Run 3657 Last:1186436770.34 -Current:1186436769.31
Run 4137 Last:1186436770.4 -Current:1186436769.36
Run 4514 Last:1186436770.44 -Current:1186436769.41
Run 4900 Last:1186436770.47 -Current:1186436769.45
Run 5317 Last:1186436770.53 -Current:1186436769.5
Run 5639 Last:1186436770.56 -Current:1186436769.53
Run 6138 Last:1186436770.62 -Current:1186436769.59
Run 6299 Last:1186436770.63 -Current:1186436769.61
Run 7112 Last:1186436770.73 -Current:1186436769.7
Run 7402 Last:1186436770.77 -Current:1186436769.73
Run 8066 Last:1186436770.85 -Current:1186436769.81
Run 8496 Last:1186436770.9 -Current:1186436769.86
Run 8904 Last:1186436770.94 -Current:1186436769.91
Run 9161 Last:1186436770.97 -Current:1186436769.94
Run 9971 Last:1186436771.07 -Current:1186436770.03
Run 10375 Last:1186436771.12 -Current:1186436770.08
Run 10738 Last:1186436771.16 -Current:1186436770.12
Run 10950 Last:1186436771.18 -Current:1186436770.14
Run 11612 Last:1186436771.26 -Current:1186436770.22
Run 11819 Last:1186436771.27 -Current:1186436770.25
Run 12361 Last:1186436771.33 -Current:1186436770.31
Run 12690 Last:1186436771.38 -Current:1186436770.34
Run 13394 Last:1186436771.46 -Current:1186436770.42
Run 13677 Last:1186436771.49 -Current:1186436770.45
Run 13728 Last:1186436771.5 -Current:1186436770.47
Run 14085 Last:1186436771.53 -Current:1186436770.5
Run 14553 Last:1186436771.58 -Current:1186436770.56
Run 14636 Last:1186436771.6 -Current:1186436770.56
Run 14978 Last:1186436771.65 -Current:1186436770.61
Run 15380 Last:1186436771.69 -Current:1186436770.66
Run 15750 Last:1186436771.73 -Current:1186436770.7
Run 16024 Last:1186436771.77 -Current:1186436770.73
Run 16719 Last:1186436771.84 -Current:1186436770.81
Run 17586 Last:1186436771.94 -Current:1186436770.91
Run 18366 Last:1186436772.03 -Current:1186436771
Run 18911 Last:1186436772.09 -Current:1186436771.06
Run 19178 Last:1186436772.13 -Current:1186436771.09
Run 19516 Last:1186436772.16 -Current:1186436771.12
Run 19743 Last:1186436772.19 -Current:1186436771.16
Run 20118 Last:1186436772.23 -Current:1186436771.19
Run 20527 Last:1186436772.27 -Current:1186436771.23
Run 21095 Last:1186436772.34 -Current:1186436771.31
Run 21526 Last:1186436772.39 -Current:1186436771.36
Run 22115 Last:1186436772.46 -Current:1186436771.42
Run 22320 Last:1186436772.49 -Current:1186436771.45
Run 23076 Last:1186436772.56 -Current:1186436771.53
Run 23278 Last:1186436772.6 -Current:1186436771.56
Run 23943 Last:1186436772.67 -Current:1186436771.64
Run 24733 Last:1186436772.75 -Current:1186436771.73
Run 25046 Last:1186436772.79 -Current:1186436771.77
Run 25635 Last:1186436772.87 -Current:1186436771.83
Run 25839 Last:1186436772.88 -Current:1186436771.86
Run 26264 Last:1186436772.94 -Current:1186436771.91
Run 27403 Last:1186436773.07 -Current:1186436772.03
Run 27747 Last:1186436773.1 -Current:1186436772.08
Run 28045 Last:1186436773.14 -Current:1186436772.11
Run 29280 Last:1186436773.28 -Current:1186436772.25
Run 29825 Last:1186436773.34 -Current:1186436772.31
Run 30124 Last:1186436773.37 -Current:1186436772.34
Run 30852 Last:1186436773.45 -Current:1186436772.42
Run 31480 Last:1186436773.52 -Cu