3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $t = microtime(true); $micro = sprintf("%06d",($t - floor($t)) * 1000000); $d = new DateTime( date('Y-m-d H:i:s.'.$micro,$t) ); print $d->format("Y-m-d H:i:s.u"); // note at point on "u"
Output for 7.1.0
2014-06-20 10:34:02.003998
Output for 7.0.14
2014-06-20 10:34:02.003693
Output for 7.0.9
2014-06-20 10:34:02.003659
Output for 7.0.8
2014-06-20 10:34:02.002549
Output for 7.0.7
2014-06-20 10:34:02.003982
Output for 7.0.6
2014-06-20 10:34:02.003756
Output for 7.0.5
2014-06-20 10:34:02.003741
Output for 7.0.4
2014-06-20 10:34:02.003459
Output for 7.0.3
2014-06-20 10:34:02.004276
Output for 7.0.2
2014-06-20 10:34:02.004079
Output for 7.0.1
2014-06-20 10:34:02.004038
Output for 7.0.0
2014-06-20 10:34:02.004004
Output for 5.6.28
2014-06-20 10:34:02.004558
Output for 5.6.24
2014-06-20 10:34:02.003119
Output for 5.6.23
2014-06-20 10:34:02.003691
Output for 5.6.22
2014-06-20 10:34:02.004637
Output for 5.6.21
2014-06-20 10:34:02.003801
Output for 5.6.20
2014-06-20 10:34:02.004128
Output for 5.6.19
2014-06-20 10:34:02.004559
Output for 5.5.19, 5.6.18
2014-06-20 10:34:02.004199
Output for 5.6.17
2014-06-20 10:34:02.005090
Output for 5.6.16
2014-06-20 10:34:02.004225
Output for 5.6.15
2014-06-20 10:34:02.002909
Output for 5.6.14
2014-06-20 10:34:02.003504
Output for 5.6.13
2014-06-20 10:34:02.004591
Output for 5.6.12
2014-06-20 10:34:02.004209
Output for 5.6.11
2014-06-20 10:34:02.004849
Output for 5.6.10
2014-06-20 10:34:02.003230
Output for 5.6.9
2014-06-20 10:34:02.004213
Output for 5.6.8
2014-06-20 10:34:02.004162
Output for 5.6.7
2014-06-20 10:34:02.003916
Output for 5.6.6
2014-06-20 10:34:02.004242
Output for 5.6.5
2014-06-20 10:34:02.002820
Output for 5.6.4
2014-06-20 10:34:02.003098
Output for 5.6.3
2014-06-20 10:34:02.003078
Output for 5.6.2
2014-06-20 10:34:02.002837
Output for 5.6.1
2014-06-20 10:34:02.002793
Output for 5.6.0
2014-06-20 10:34:02.003144
Output for 5.5.38
2014-06-20 10:34:02.003175
Output for 5.5.37
2014-06-20 10:34:02.003644
Output for 5.5.36
2014-06-20 10:34:02.004599
Output for 5.5.35
2014-06-20 10:34:02.004533
Output for 5.5.34
2014-06-20 10:34:02.004844
Output for 5.5.33
2014-06-20 10:34:02.003695
Output for 5.5.32
2014-06-20 10:34:02.004928
Output for 5.5.31
2014-06-20 10:34:02.004003
Output for 5.5.30
2014-06-20 10:34:02.003173
Output for 5.5.29
2014-06-20 10:34:02.003681
Output for 5.5.28
2014-06-20 10:34:02.004513
Output for 5.5.27
2014-06-20 10:34:02.004930
Output for 5.5.26
2014-06-20 10:34:02.003561
Output for 5.5.25
2014-06-20 10:34:02.004241
Output for 5.5.24
2014-06-20 10:34:02.005063
Output for 5.5.23
2014-06-20 10:34:02.003711
Output for 5.5.22
2014-06-20 10:34:02.004724
Output for 5.5.21
2014-06-20 10:34:02.003314
Output for 5.5.20
2014-06-20 10:34:02.002928
Output for 5.5.18
2014-06-20 10:34:02.002804
Output for 5.5.16
2014-06-20 10:34:02.002682
Output for 5.5.15
2014-06-20 10:34:02.002979
Output for 5.5.14
2014-06-20 10:34:02.002805
Output for 5.5.13
2014-06-20 10:34:02.003019
Output for 5.5.7, 5.5.12
2014-06-20 10:34:02.002680
Output for 5.5.11
2014-06-20 10:34:02.002697
Output for 5.5.10
2014-06-20 10:34:02.002840
Output for 5.5.9
2014-06-20 10:34:02.002754
Output for 5.5.6, 5.5.8
2014-06-20 10:34:02.002711
Output for 5.5.5
2014-06-20 10:34:02.002720
Output for 5.5.4
2014-06-20 10:34:02.002693
Output for 5.5.3
2014-06-20 10:34:02.004096
Output for 5.5.2
2014-06-20 10:34:02.003349
Output for 5.5.1
2014-06-20 10:34:02.003978
Output for 5.5.0
2014-06-20 10:34:02.002846
Output for 5.4.45
2014-06-20 10:34:02.003602
Output for 5.4.44
2014-06-20 10:34:02.003854
Output for 5.4.43
2014-06-20 10:34:02.002868
Output for 5.4.42
2014-06-20 10:34:02.002660
Output for 5.4.41
2014-06-20 10:34:02.003438
Output for 5.4.40
2014-06-20 10:34:02.004329
Output for 5.4.39
2014-06-20 10:34:02.003774
Output for 5.4.38
2014-06-20 10:34:02.004291
Output for 5.4.37
2014-06-20 10:34:02.005733
Output for 5.4.36
2014-06-20 10:34:02.002439
Output for 5.4.35
2014-06-20 10:34:02.002736
Output for 5.4.34
2014-06-20 10:34:02.002429
Output for 5.4.32
2014-06-20 10:34:02.002338
Output for 5.4.31
2014-06-20 10:34:02.002413
Output for 5.4.30
2014-06-20 10:34:02.002171
Output for 5.4.29
2014-06-20 10:34:02.003480
Output for 5.4.15, 5.4.18, 5.4.28
2014-06-20 10:34:02.002320
Output for 5.4.27
2014-06-20 10:34:02.002594
Output for 5.4.26
2014-06-20 10:34:02.003679
Output for 5.4.25
2014-06-20 10:34:02.002412
Output for 5.4.24
2014-06-20 10:34:02.002392
Output for 5.4.23
2014-06-20 10:34:02.002763
Output for 5.4.22
2014-06-20 10:34:02.002602
Output for 5.4.21
2014-06-20 10:34:02.003667
Output for 5.4.20
2014-06-20 10:34:02.003770
Output for 5.4.19
2014-06-20 10:34:02.003055
Output for 5.4.17
2014-06-20 10:34:02.002324
Output for 5.4.16
2014-06-20 10:34:02.002317
Output for 5.4.14
2014-06-20 10:34:02.001174
Output for 5.4.13
2014-06-20 10:34:02.001374
Output for 5.4.12
2014-06-20 10:34:02.001255
Output for 5.4.11
2014-06-20 10:34:02.001230
Output for 5.4.10
2014-06-20 10:34:02.001146
Output for 5.4.9
2014-06-20 10:34:02.001805
Output for 5.4.8
2014-06-20 10:34:02.001857
Output for 5.4.7
2014-06-20 10:34:02.002017
Output for 5.4.6
2014-06-20 10:34:02.001523
Output for 5.4.5
2014-06-20 10:34:02.001646
Output for 5.4.4
2014-06-20 10:34:02.001624
Output for 5.4.3
2014-06-20 10:34:02.002134
Output for 5.4.2
2014-06-20 10:34:02.001893
Output for 5.4.1
2014-06-20 10:34:02.002461
Output for 5.4.0
2014-06-20 10:34:02.002096
Output for 5.3.29
2014-06-20 10:34:02.001324
Output for 5.3.28
2014-06-20 10:34:02.001390
Output for 5.3.27
2014-06-20 10:34:02.001486
Output for 5.3.26
2014-06-20 10:34:02.001477
Output for 5.3.25
2014-06-20 10:34:02.001327
Output for 5.3.24
2014-06-20 10:34:02.002029
Output for 5.3.23
2014-06-20 10:34:02.001524
Output for 5.3.20 - 5.3.22
2014-06-20 10:34:02.001321
Output for 5.3.19
2014-06-20 10:34:02.001466
Output for 5.3.18
2014-06-20 10:34:02.002290
Output for 5.3.17
2014-06-20 10:34:02.002301
Output for 5.3.16
2014-06-20 10:34:02.002295
Output for 5.3.15
2014-06-20 10:34:02.002419
Output for 5.3.14
2014-06-20 10:34:02.001868
Output for 5.3.13
2014-06-20 10:34:02.002336
Output for 5.3.12
2014-06-20 10:34:02.001910
Output for 5.3.11
2014-06-20 10:34:02.002115
Output for 5.3.10
2014-06-20 10:34:02.001708
Output for 5.3.9
2014-06-20 10:34:02.002259
Output for 5.3.8
2014-06-20 10:34:02.002080
Output for 5.3.7
2014-06-20 10:34:02.002387
Output for 5.3.6
2014-06-20 10:34:02.002053
Output for 5.3.5
2014-06-20 10:34:02.001622
Output for 5.3.4
2014-06-20 10:34:02.002244
Output for 5.3.3
2014-06-20 10:34:02.002388
Output for 5.3.2
2014-06-20 10:34:02.002176
Output for 5.3.1
2014-06-20 10:34:02.001766
Output for 5.3.0
2014-06-20 10:34:02.001936
Output for 5.2.17
2014-06-20 10:34:02.001635
Output for 5.2.16
2014-06-20 10:34:02.001957
Output for 5.2.15
2014-06-20 10:34:02.001643
Output for 5.2.14
2014-06-20 10:34:02.001554
Output for 5.2.13
2014-06-20 10:34:02.001713
Output for 5.2.12
2014-06-20 10:34:02.001765
Output for 5.2.11
2014-06-20 10:34:02.001968
Output for 5.2.10
2014-06-20 10:34:02.001813
Output for 5.2.9
2014-06-20 10:34:02.001831
Output for 5.2.8
2014-06-20 10:34:02.001749
Output for 5.2.7
2014-06-20 10:34:02.001904
Output for 5.2.6
2014-06-20 10:34:02.001307
Output for 5.2.5
2014-06-20 10:34:02.002023
Output for 5.2.4
2014-06-20 10:34:02.001848
Output for 5.2.3
2014-06-20 10:34:02.001899
Output for 5.2.2
2014-06-20 10:34:02.001954
Output for 5.2.0 - 5.2.1
2014-06-20 10:34:02.u
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/2nOTe on line 5
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/2nOTe on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/2nOTe on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/2nOTe on line 5