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("YmdHisu"); // note at point on "u"
Output for 5.5.26, 5.6.8, 7.1.0
20140620103445004132
Output for 7.0.14
20140620103445003777
Output for 7.0.6, 7.0.8
20140620103445002402
Output for 7.0.7
20140620103445002379
Output for 7.0.5
20140620103445002418
Output for 7.0.4
20140620103445002840
Output for 7.0.3
20140620103445002388
Output for 7.0.2
20140620103445003892
Output for 7.0.1
20140620103445003685
Output for 7.0.0
20140620103445003789
Output for 5.6.28
20140620103445004544
Output for 5.6.23
20140620103445002918
Output for 5.6.22
20140620103445003202
Output for 5.6.21
20140620103445002901
Output for 5.6.20
20140620103445003166
Output for 5.6.19
20140620103445003072
Output for 5.6.18
20140620103445003499
Output for 5.6.17
20140620103445002968
Output for 5.6.16
20140620103445004673
Output for 5.6.15
20140620103445003859
Output for 5.6.14
20140620103445004256
Output for 5.6.13
20140620103445004636
Output for 5.6.12
20140620103445004594
Output for 5.6.11
20140620103445004622
Output for 5.6.10
20140620103445004872
Output for 5.6.9
20140620103445004321
Output for 5.6.7
20140620103445003936
Output for 5.6.6
20140620103445004853
Output for 5.6.5
20140620103445004437
Output for 5.6.4
20140620103445003611
Output for 5.6.3
20140620103445004033
Output for 5.6.2
20140620103445004750
Output for 5.6.1
20140620103445004199
Output for 5.6.0
20140620103445004465
Output for 5.5.37
20140620103445002705
Output for 5.5.36
20140620103445003529
Output for 5.5.35
20140620103445002439
Output for 5.5.34
20140620103445002497
Output for 5.5.33
20140620103445002688
Output for 5.5.32
20140620103445003715
Output for 5.5.31
20140620103445004460
Output for 5.5.30
20140620103445004730
Output for 5.5.29
20140620103445004412
Output for 5.5.28
20140620103445004396
Output for 5.4.34, 5.5.27
20140620103445004117
Output for 5.5.25
20140620103445003680
Output for 5.5.24
20140620103445003624
Output for 5.5.23
20140620103445003964
Output for 5.5.22
20140620103445004400
Output for 5.5.21
20140620103445003839
Output for 5.5.20
20140620103445004390
Output for 5.5.19
20140620103445004980
Output for 5.5.18
20140620103445004817
Output for 5.5.16
20140620103445004398
Output for 5.5.15
20140620103445004137
Output for 5.5.14
20140620103445004569
Output for 5.5.13
20140620103445005067
Output for 5.5.12
20140620103445004842
Output for 5.5.11
20140620103445004784
Output for 5.5.10
20140620103445002939
Output for 5.5.9
20140620103445004829
Output for 5.5.8
20140620103445004295
Output for 5.5.7
20140620103445005213
Output for 5.5.6
20140620103445004493
Output for 5.5.5
20140620103445004292
Output for 5.5.4
20140620103445004820
Output for 5.5.3
20140620103445005095
Output for 5.5.2
20140620103445004200
Output for 5.5.1
20140620103445003684
Output for 5.5.0
20140620103445003223
Output for 5.4.45
20140620103445003607
Output for 5.4.44
20140620103445004070
Output for 5.4.43
20140620103445003222
Output for 5.4.42
20140620103445004410
Output for 5.4.41
20140620103445003716
Output for 5.4.40
20140620103445003035
Output for 5.4.39
20140620103445004089
Output for 5.4.38
20140620103445003371
Output for 5.4.37
20140620103445004133
Output for 5.4.36
20140620103445004128
Output for 5.4.35
20140620103445003314
Output for 5.4.32
20140620103445003774
Output for 5.4.31
20140620103445003853
Output for 5.4.30
20140620103445003492
Output for 5.4.29
20140620103445003494
Output for 5.4.28
20140620103445003937
Output for 5.4.27
20140620103445003885
Output for 5.4.26
20140620103445004131
Output for 5.4.25
20140620103445003591
Output for 5.4.24
20140620103445003848
Output for 5.4.23
20140620103445003568
Output for 5.4.22
20140620103445004246
Output for 5.4.21
20140620103445004023
Output for 5.4.20
20140620103445003886
Output for 5.4.19
20140620103445004087
Output for 5.4.18
20140620103445003782
Output for 5.4.17
20140620103445002530
Output for 5.4.16
20140620103445004163
Output for 5.4.15
20140620103445004765
Output for 5.4.14
20140620103445002068
Output for 5.4.13
20140620103445002310
Output for 5.4.12
20140620103445001391
Output for 5.4.11
20140620103445002113
Output for 5.4.10
20140620103445001979
Output for 5.4.9
20140620103445001871
Output for 5.4.8
20140620103445002279
Output for 5.4.7
20140620103445002147
Output for 5.4.6
20140620103445002090
Output for 5.4.5
20140620103445003288
Output for 5.4.4
20140620103445002294
Output for 5.4.3
20140620103445001934
Output for 5.4.2
20140620103445001858
Output for 5.4.1
20140620103445002190
Output for 5.4.0
20140620103445001768
Output for 5.3.29
20140620103445001719
Output for 5.3.28
20140620103445002343
Output for 5.3.27
20140620103445002038
Output for 5.3.26
20140620103445001410
Output for 5.3.25
20140620103445002006
Output for 5.3.24
20140620103445002151
Output for 5.3.23
20140620103445001497
Output for 5.3.22
20140620103445001447
Output for 5.3.21
20140620103445001451
Output for 5.3.20
20140620103445001893
Output for 5.3.19
20140620103445002315
Output for 5.3.18
20140620103445002398
Output for 5.3.17
20140620103445002304
Output for 5.3.8, 5.3.16
20140620103445001996
Output for 5.3.15
20140620103445002405
Output for 5.3.14
20140620103445002325
Output for 5.3.13
20140620103445002335
Output for 5.3.12
20140620103445001924
Output for 5.3.11
20140620103445002783
Output for 5.3.10
20140620103445002311
Output for 5.3.9
20140620103445002574
Output for 5.3.7
20140620103445002149
Output for 5.3.6
20140620103445002182
Output for 5.3.5
20140620103445001978
Output for 5.3.4
20140620103445001460
Output for 5.3.3
20140620103445001944
Output for 5.3.2
20140620103445002185
Output for 5.3.1
20140620103445002165
Output for 5.3.0
20140620103445002078
Output for 5.2.17
20140620103445001641
Output for 5.2.16
20140620103445001626
Output for 5.2.15
20140620103445001203
Output for 5.2.14
20140620103445001801
Output for 5.2.13
20140620103445001863
Output for 5.2.12
20140620103445001507
Output for 5.2.11
20140620103445001415
Output for 5.2.10
20140620103445001877
Output for 5.2.9
20140620103445001859
Output for 5.2.8
20140620103445001929
Output for 5.2.7
20140620103445001866
Output for 5.2.6
20140620103445001888
Output for 5.2.5
20140620103445001300
Output for 5.2.4
20140620103445001753
Output for 5.2.3
20140620103445001558
Output for 5.2.2
20140620103445001288
Output for 5.2.0 - 5.2.1
20140620103445u
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/273NH 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/273NH 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/273NH 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/273NH on line 5