3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo date("y/m/d i:s:u", 972); $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
70/01/01 16:12:0000002014-06-20 10:33:32.004074
Output for 7.0.14
70/01/01 16:12:0000002014-06-20 10:33:32.003890
Output for 7.0.10
70/01/01 16:12:0000002014-06-20 10:33:32.004015
Output for 7.0.9
70/01/01 16:12:0000002014-06-20 10:33:32.005505
Output for 7.0.8
70/01/01 16:12:0000002014-06-20 10:33:32.003463
Output for 7.0.7
70/01/01 16:12:0000002014-06-20 10:33:32.003767
Output for 7.0.6
70/01/01 16:12:0000002014-06-20 10:33:32.003122
Output for 7.0.5
70/01/01 16:12:0000002014-06-20 10:33:32.003521
Output for 7.0.4
70/01/01 16:12:0000002014-06-20 10:33:32.002666
Output for 7.0.3
70/01/01 16:12:0000002014-06-20 10:33:32.003273
Output for 7.0.2
70/01/01 16:12:0000002014-06-20 10:33:32.002676
Output for 7.0.1
70/01/01 16:12:0000002014-06-20 10:33:32.002494
Output for 7.0.0
70/01/01 16:12:0000002014-06-20 10:33:32.002564
Output for 5.6.28
70/01/01 16:12:0000002014-06-20 10:33:32.004560
Output for 5.4.23, 5.6.25
70/01/01 16:12:0000002014-06-20 10:33:32.003971
Output for 5.6.24
70/01/01 16:12:0000002014-06-20 10:33:32.002958
Output for 5.6.23
70/01/01 16:12:0000002014-06-20 10:33:32.003658
Output for 5.6.22
70/01/01 16:12:0000002014-06-20 10:33:32.003372
Output for 5.6.21
70/01/01 16:12:0000002014-06-20 10:33:32.004607
Output for 5.6.20
70/01/01 16:12:0000002014-06-20 10:33:32.003747
Output for 5.6.19
70/01/01 16:12:0000002014-06-20 10:33:32.003146
Output for 5.6.18
70/01/01 16:12:0000002014-06-20 10:33:32.002772
Output for 5.6.17
70/01/01 16:12:0000002014-06-20 10:33:32.004390
Output for 5.6.16
70/01/01 16:12:0000002014-06-20 10:33:32.003798
Output for 5.6.15
70/01/01 16:12:0000002014-06-20 10:33:32.003065
Output for 5.6.14
70/01/01 16:12:0000002014-06-20 10:33:32.003220
Output for 5.6.13
70/01/01 16:12:0000002014-06-20 10:33:32.005532
Output for 5.6.12
70/01/01 16:12:0000002014-06-20 10:33:32.002953
Output for 5.6.11
70/01/01 16:12:0000002014-06-20 10:33:32.003052
Output for 5.6.10
70/01/01 16:12:0000002014-06-20 10:33:32.002778
Output for 5.6.9
70/01/01 16:12:0000002014-06-20 10:33:32.003751
Output for 5.6.8
70/01/01 16:12:0000002014-06-20 10:33:32.002815
Output for 5.6.7
70/01/01 16:12:0000002014-06-20 10:33:32.003251
Output for 5.6.6
70/01/01 16:12:0000002014-06-20 10:33:32.003058
Output for 5.6.5
70/01/01 16:12:0000002014-06-20 10:33:32.003061
Output for 5.6.4
70/01/01 16:12:0000002014-06-20 10:33:32.002686
Output for 5.6.3
70/01/01 16:12:0000002014-06-20 10:33:32.003088
Output for 5.6.2
70/01/01 16:12:0000002014-06-20 10:33:32.003057
Output for 5.6.1
70/01/01 16:12:0000002014-06-20 10:33:32.003165
Output for 5.6.0
70/01/01 16:12:0000002014-06-20 10:33:32.003083
Output for 5.5.38
70/01/01 16:12:0000002014-06-20 10:33:32.004196
Output for 5.5.37
70/01/01 16:12:0000002014-06-20 10:33:32.004615
Output for 5.5.36
70/01/01 16:12:0000002014-06-20 10:33:32.003730
Output for 5.5.35
70/01/01 16:12:0000002014-06-20 10:33:32.003560
Output for 5.5.34
70/01/01 16:12:0000002014-06-20 10:33:32.003741
Output for 5.5.33
70/01/01 16:12:0000002014-06-20 10:33:32.002739
Output for 5.5.32
70/01/01 16:12:0000002014-06-20 10:33:32.003103
Output for 5.5.31
70/01/01 16:12:0000002014-06-20 10:33:32.003532
Output for 5.5.30
70/01/01 16:12:0000002014-06-20 10:33:32.004259
Output for 5.5.29
70/01/01 16:12:0000002014-06-20 10:33:32.002969
Output for 5.5.28
70/01/01 16:12:0000002014-06-20 10:33:32.002939
Output for 5.5.27
70/01/01 16:12:0000002014-06-20 10:33:32.003037
Output for 5.5.26
70/01/01 16:12:0000002014-06-20 10:33:32.003066
Output for 5.5.25
70/01/01 16:12:0000002014-06-20 10:33:32.002759
Output for 5.5.24
70/01/01 16:12:0000002014-06-20 10:33:32.003076
Output for 5.5.23
70/01/01 16:12:0000002014-06-20 10:33:32.002914
Output for 5.5.22
70/01/01 16:12:0000002014-06-20 10:33:32.003470
Output for 5.5.21
70/01/01 16:12:0000002014-06-20 10:33:32.002820
Output for 5.5.20
70/01/01 16:12:0000002014-06-20 10:33:32.003063
Output for 5.5.19
70/01/01 16:12:0000002014-06-20 10:33:32.003181
Output for 5.5.18
70/01/01 16:12:0000002014-06-20 10:33:32.003139
Output for 5.5.16
70/01/01 16:12:0000002014-06-20 10:33:32.002707
Output for 5.5.15
70/01/01 16:12:0000002014-06-20 10:33:32.002840
Output for 5.5.14
70/01/01 16:12:0000002014-06-20 10:33:32.003674
Output for 5.5.13
70/01/01 16:12:0000002014-06-20 10:33:32.002706
Output for 5.5.12
70/01/01 16:12:0000002014-06-20 10:33:32.004364
Output for 5.5.11
70/01/01 16:12:0000002014-06-20 10:33:32.003825
Output for 5.5.10
70/01/01 16:12:0000002014-06-20 10:33:32.004156
Output for 5.5.9
70/01/01 16:12:0000002014-06-20 10:33:32.003489
Output for 5.5.8
70/01/01 16:12:0000002014-06-20 10:33:32.003734
Output for 5.5.7
70/01/01 16:12:0000002014-06-20 10:33:32.003550
Output for 5.5.6
70/01/01 16:12:0000002014-06-20 10:33:32.003199
Output for 5.5.5
70/01/01 16:12:0000002014-06-20 10:33:32.004908
Output for 5.5.4
70/01/01 16:12:0000002014-06-20 10:33:32.004441
Output for 5.5.3
70/01/01 16:12:0000002014-06-20 10:33:32.004636
Output for 5.5.2
70/01/01 16:12:0000002014-06-20 10:33:32.005043
Output for 5.5.1
70/01/01 16:12:0000002014-06-20 10:33:32.004287
Output for 5.5.0
70/01/01 16:12:0000002014-06-20 10:33:32.004175
Output for 5.4.45
70/01/01 16:12:0000002014-06-20 10:33:32.002408
Output for 5.4.44
70/01/01 16:12:0000002014-06-20 10:33:32.002612
Output for 5.4.42 - 5.4.43
70/01/01 16:12:0000002014-06-20 10:33:32.002587
Output for 5.4.41
70/01/01 16:12:0000002014-06-20 10:33:32.002463
Output for 5.4.40
70/01/01 16:12:0000002014-06-20 10:33:32.002367
Output for 5.4.39
70/01/01 16:12:0000002014-06-20 10:33:32.002439
Output for 5.4.38
70/01/01 16:12:0000002014-06-20 10:33:32.003123
Output for 5.4.37
70/01/01 16:12:0000002014-06-20 10:33:32.003226
Output for 5.4.36
70/01/01 16:12:0000002014-06-20 10:33:32.002373
Output for 5.4.35
70/01/01 16:12:0000002014-06-20 10:33:32.002429
Output for 5.4.34
70/01/01 16:12:0000002014-06-20 10:33:32.002711
Output for 5.4.32
70/01/01 16:12:0000002014-06-20 10:33:32.002388
Output for 5.4.31
70/01/01 16:12:0000002014-06-20 10:33:32.002660
Output for 5.4.30
70/01/01 16:12:0000002014-06-20 10:33:32.002441
Output for 5.4.29
70/01/01 16:12:0000002014-06-20 10:33:32.003237
Output for 5.4.28
70/01/01 16:12:0000002014-06-20 10:33:32.003340
Output for 5.4.27
70/01/01 16:12:0000002014-06-20 10:33:32.003339
Output for 5.4.26
70/01/01 16:12:0000002014-06-20 10:33:32.004055
Output for 5.4.25
70/01/01 16:12:0000002014-06-20 10:33:32.003985
Output for 5.4.24
70/01/01 16:12:0000002014-06-20 10:33:32.004539
Output for 5.4.22
70/01/01 16:12:0000002014-06-20 10:33:32.003916
Output for 5.4.21
70/01/01 16:12:0000002014-06-20 10:33:32.003948
Output for 5.4.20
70/01/01 16:12:0000002014-06-20 10:33:32.003865
Output for 5.4.19
70/01/01 16:12:0000002014-06-20 10:33:32.002696
Output for 5.4.18
70/01/01 16:12:0000002014-06-20 10:33:32.004323
Output for 5.4.17
70/01/01 16:12:0000002014-06-20 10:33:32.002922
Output for 5.4.16
70/01/01 16:12:0000002014-06-20 10:33:32.003366
Output for 5.4.15
70/01/01 16:12:0000002014-06-20 10:33:32.004507
Output for 5.4.14
70/01/01 16:12:0000002014-06-20 10:33:32.002198
Output for 5.4.13
70/01/01 16:12:0000002014-06-20 10:33:32.002315
Output for 5.4.12
70/01/01 16:12:0000002014-06-20 10:33:32.002034
Output for 5.4.11
70/01/01 16:12:0000002014-06-20 10:33:32.001801
Output for 5.4.10
70/01/01 16:12:0000002014-06-20 10:33:32.001413
Output for 5.4.9
70/01/01 16:12:0000002014-06-20 10:33:32.002049
Output for 5.4.8
70/01/01 16:12:0000002014-06-20 10:33:32.002254
Output for 5.4.7
70/01/01 16:12:0000002014-06-20 10:33:32.002077
Output for 5.4.6
70/01/01 16:12:0000002014-06-20 10:33:32.002346
Output for 5.4.5
70/01/01 16:12:0000002014-06-20 10:33:32.002240
Output for 5.3.19, 5.4.4
70/01/01 16:12:0000002014-06-20 10:33:32.002264
Output for 5.4.3
70/01/01 16:12:0000002014-06-20 10:33:32.001970
Output for 5.4.2
70/01/01 16:12:0000002014-06-20 10:33:32.002301
Output for 5.4.1
70/01/01 16:12:0000002014-06-20 10:33:32.002063
Output for 5.4.0
70/01/01 16:12:0000002014-06-20 10:33:32.002011
Output for 5.3.29
70/01/01 16:12:0000002014-06-20 10:33:32.001482
Output for 5.3.28
70/01/01 16:12:0000002014-06-20 10:33:32.002501
Output for 5.3.27
70/01/01 16:12:0000002014-06-20 10:33:32.002559
Output for 5.3.26
70/01/01 16:12:0000002014-06-20 10:33:32.002120
Output for 5.3.25
70/01/01 16:12:0000002014-06-20 10:33:32.003148
Output for 5.3.24
70/01/01 16:12:0000002014-06-20 10:33:32.002018
Output for 5.3.23
70/01/01 16:12:0000002014-06-20 10:33:32.002340
Output for 5.3.22
70/01/01 16:12:0000002014-06-20 10:33:32.002051
Output for 5.3.21
70/01/01 16:12:0000002014-06-20 10:33:32.001795
Output for 5.3.20
70/01/01 16:12:0000002014-06-20 10:33:32.002352
Output for 5.3.18
70/01/01 16:12:0000002014-06-20 10:33:32.002024
Output for 5.3.17
70/01/01 16:12:0000002014-06-20 10:33:32.002258
Output for 5.3.16
70/01/01 16:12:0000002014-06-20 10:33:32.002130
Output for 5.3.15
70/01/01 16:12:0000002014-06-20 10:33:32.002027
Output for 5.3.14
70/01/01 16:12:0000002014-06-20 10:33:32.001971
Output for 5.3.13
70/01/01 16:12:0000002014-06-20 10:33:32.002358
Output for 5.3.12
70/01/01 16:12:0000002014-06-20 10:33:32.002012
Output for 5.3.11
70/01/01 16:12:0000002014-06-20 10:33:32.002262
Output for 5.3.10
70/01/01 16:12:0000002014-06-20 10:33:32.001918
Output for 5.3.9
70/01/01 16:12:0000002014-06-20 10:33:32.002160
Output for 5.3.8
70/01/01 16:12:0000002014-06-20 10:33:32.002093
Output for 5.3.7
70/01/01 16:12:0000002014-06-20 10:33:32.002033
Output for 5.3.6
70/01/01 16:12:0000002014-06-20 10:33:32.002145
Output for 5.3.5
70/01/01 16:12:0000002014-06-20 10:33:32.002156
Output for 5.3.4
70/01/01 16:12:0000002014-06-20 10:33:32.002054
Output for 5.3.3
70/01/01 16:12:0000002014-06-20 10:33:32.002239
Output for 5.3.2
70/01/01 16:12:0000002014-06-20 10:33:32.002090
Output for 5.3.1
70/01/01 16:12:0000002014-06-20 10:33:32.002362
Output for 5.3.0
70/01/01 16:12:0000002014-06-20 10:33:32.001697
Output for 5.2.17
70/01/01 16:12:0000002014-06-20 10:33:32.001354
Output for 5.2.16
70/01/01 16:12:0000002014-06-20 10:33:32.002007
Output for 5.2.15
70/01/01 16:12:0000002014-06-20 10:33:32.001713
Output for 5.2.14
70/01/01 16:12:0000002014-06-20 10:33:32.002464
Output for 5.2.13
70/01/01 16:12:0000002014-06-20 10:33:32.001401
Output for 5.2.12
70/01/01 16:12:0000002014-06-20 10:33:32.001741
Output for 5.2.11
70/01/01 16:12:0000002014-06-20 10:33:32.001986
Output for 5.2.10
70/01/01 16:12:0000002014-06-20 10:33:32.001616
Output for 5.2.9
70/01/01 16:12:0000002014-06-20 10:33:32.001902
Output for 5.2.8
70/01/01 16:12:0000002014-06-20 10:33:32.001554
Output for 5.2.7
70/01/01 16:12:0000002014-06-20 10:33:32.002046
Output for 5.2.6
70/01/01 16:12:0000002014-06-20 10:33:32.001260
Output for 5.2.5
70/01/01 16:12:0000002014-06-20 10:33:32.001540
Output for 5.2.4
70/01/01 16:12:0000002014-06-20 10:33:32.002037
Output for 5.2.3
70/01/01 16:12:0000002014-06-20 10:33:32.001724
Output for 5.2.2
70/01/01 16:12:0000002014-06-20 10:33:32.001794
Output for 5.2.0 - 5.2.1
70/01/01 16:12:u2014-06-20 10:33:32.u
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.1.6
70/01/01 16:12:u Fatal error: Class 'DateTime' not found in /in/u60ZG on line 8
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/u60ZG on line 10
Process exited with code 255.
Output for 4.3.2 - 4.4.9
70/01/01 16:12:u Fatal error: Cannot instantiate non-existent class: datetime in /in/u60ZG on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
70/01/01 16:12:u Fatal error: Cannot instantiate non-existent class: datetime in /in/u60ZG on line 8