3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime(); $dstr = $dt->format('Y-m-d H:i:s.u'); $darr = explode(".", $dstr) ; $darr[1] = sprintf("%6d", mt_rand(0, 999999)) ; $dstr = implode(".", $darr) ; echo $dstr . "\n"; $dn = DateTime::createFromFormat('Y-m-d H:i:s.u', $dstr); echo $dn->format('U.u') . "\n";
Output for 7.1.0
2013-10-08 12:23:42. 11202 Fatal error: Uncaught Error: Call to a member function format() on boolean in /in/V8a9A:9 Stack trace: #0 {main} thrown in /in/V8a9A on line 9
Process exited with code 255.
Output for 7.0.14
2013-10-08 12:23:42. 33182 Fatal error: Uncaught Error: Call to a member function format() on boolean in /in/V8a9A:9 Stack trace: #0 {main} thrown in /in/V8a9A on line 9
Process exited with code 255.
Output for 7.0.10
2013-10-08 12:23:42.861089 1381227822.861089
Output for 7.0.9
2013-10-08 12:23:42.970945 1381227822.970945
Output for 7.0.8
2013-10-08 12:23:42.137468 1381227822.137468
Output for 7.0.7
2013-10-08 12:23:42. 22619 Fatal error: Uncaught Error: Call to a member function format() on boolean in /in/V8a9A:9 Stack trace: #0 {main} thrown in /in/V8a9A on line 9
Process exited with code 255.
Output for 7.0.6
2013-10-08 12:23:42.816863 1381227822.816863
Output for 7.0.5
2013-10-08 12:23:42.742880 1381227822.742880
Output for 7.0.4
2013-10-08 12:23:42.770928 1381227822.770928
Output for 7.0.3
2013-10-08 12:23:42.817997 1381227822.817997
Output for 7.0.2
2013-10-08 12:23:42. 7940 Fatal error: Uncaught Error: Call to a member function format() on boolean in /in/V8a9A:9 Stack trace: #0 {main} thrown in /in/V8a9A on line 9
Process exited with code 255.
Output for 7.0.1
2013-10-08 12:23:42.419393 1381227822.419393
Output for 7.0.0
2013-10-08 12:23:42.357288 1381227822.357288
Output for 5.6.28
2013-10-08 12:23:42.176340 1381227822.176340
Output for 5.6.25
2013-10-08 12:23:42.519876 1381227822.519876
Output for 5.6.24
2013-10-08 12:23:42.174029 1381227822.174029
Output for 5.6.23
2013-10-08 12:23:42.170012 1381227822.170012
Output for 5.6.22
2013-10-08 12:23:42.665012 1381227822.665012
Output for 5.6.21
2013-10-08 12:23:42.604145 1381227822.604145
Output for 5.6.20
2013-10-08 12:23:42.645123 1381227822.645123
Output for 5.6.19
2013-10-08 12:23:42.374011 1381227822.374011
Output for 5.6.18
2013-10-08 12:23:42. 80667 Fatal error: Call to a member function format() on boolean in /in/V8a9A on line 9
Process exited with code 255.
Output for 5.6.17
2013-10-08 12:23:42.391136 1381227822.391136
Output for 5.6.16
2013-10-08 12:23:42.508622 1381227822.508622
Output for 5.6.15
2013-10-08 12:23:42.608857 1381227822.608857
Output for 5.6.14
2013-10-08 12:23:42.563631 1381227822.563631
Output for 5.6.13
2013-10-08 12:23:42.125598 1381227822.125598
Output for 5.6.12
2013-10-08 12:23:42. 8864 Fatal error: Call to a member function format() on boolean in /in/V8a9A on line 9
Process exited with code 255.
Output for 5.6.11
2013-10-08 12:23:42.853505 1381227822.853505
Output for 5.6.10
2013-10-08 12:23:42. 33266 Fatal error: Call to a member function format() on boolean in /in/V8a9A on line 9
Process exited with code 255.
Output for 5.6.9
2013-10-08 12:23:42.632952 1381227822.632952
Output for 5.6.8
2013-10-08 12:23:42.986813 1381227822.986813
Output for 5.6.7
2013-10-08 12:23:42.491359 1381227822.491359
Output for 5.6.6
2013-10-08 12:23:42.707938 1381227822.707938
Output for 5.6.5
2013-10-08 12:23:42.503685 1381227822.503685
Output for 5.6.4
2013-10-08 12:23:42.571696 1381227822.571696
Output for 5.6.3
2013-10-08 12:23:42.316158 1381227822.316158
Output for 5.6.2
2013-10-08 12:23:42.329269 1381227822.329269
Output for 5.6.1
2013-10-08 12:23:42.892735 1381227822.892735
Output for 5.6.0
2013-10-08 12:23:42.272676 1381227822.272676
Output for 5.5.38
2013-10-08 12:23:42.413948 1381227822.413948
Output for 5.5.37
2013-10-08 12:23:42.488527 1381227822.488527
Output for 5.5.36
2013-10-08 12:23:42.255155 1381227822.255155
Output for 5.5.35
2013-10-08 12:23:42.903412 1381227822.903412
Output for 5.5.34
2013-10-08 12:23:42.436803 1381227822.436803
Output for 5.5.33
2013-10-08 12:23:42.343863 1381227822.343863
Output for 5.5.32
2013-10-08 12:23:42.332892 1381227822.332892
Output for 5.5.31
2013-10-08 12:23:42.357515 1381227822.357515
Output for 5.5.30
2013-10-08 12:23:42.922416 1381227822.922416
Output for 5.5.29
2013-10-08 12:23:42.291272 1381227822.291272
Output for 5.5.28
2013-10-08 12:23:42.176825 1381227822.176825
Output for 5.5.27
2013-10-08 12:23:42.293467 1381227822.293467
Output for 5.5.26
2013-10-08 12:23:42. 84423 Fatal error: Call to a member function format() on a non-object in /in/V8a9A on line 9
Process exited with code 255.
Output for 5.5.25
2013-10-08 12:23:42.746343 1381227822.746343
Output for 5.5.24
2013-10-08 12:23:42.904867 1381227822.904867
Output for 5.5.23
2013-10-08 12:23:42.682351 1381227822.682351
Output for 5.5.22
2013-10-08 12:23:42.184135 1381227822.184135
Output for 5.5.21
2013-10-08 12:23:42.625126 1381227822.625126
Output for 5.5.20
2013-10-08 12:23:42. 64775 Fatal error: Call to a member function format() on a non-object in /in/V8a9A on line 9
Process exited with code 255.
Output for 5.5.19
2013-10-08 12:23:42.685463 1381227822.685463
Output for 5.5.18
2013-10-08 12:23:42.444858 1381227822.444858
Output for 5.5.16
2013-10-08 12:23:42.304257 1381227822.304257
Output for 5.5.15
2013-10-08 12:23:42.909460 1381227822.909460
Output for 5.5.14
2013-10-08 12:23:42.142850 1381227822.142850
Output for 5.5.13
2013-10-08 12:23:42.295802 1381227822.295802
Output for 5.5.12
2013-10-08 12:23:42.822960 1381227822.822960
Output for 5.5.11
2013-10-08 12:23:42.677226 1381227822.677226
Output for 5.5.10
2013-10-08 12:23:42.199238 1381227822.199238
Output for 5.5.9
2013-10-08 12:23:42.888204 1381227822.888204
Output for 5.5.8
2013-10-08 12:23:42. 95401 Fatal error: Call to a member function format() on a non-object in /in/V8a9A on line 9
Process exited with code 255.
Output for 5.5.7
2013-10-08 12:23:42.121764 1381227822.121764
Output for 5.5.6
2013-10-08 12:23:42.219092 1381227822.219092
Output for 5.5.5
2013-10-08 12:23:42.928322 1381227822.928322
Output for 5.5.4
2013-10-08 12:23:42. 20881 Fatal error: Call to a member function format() on a non-object in /in/V8a9A on line 9
Process exited with code 255.
Output for 5.5.3
2013-10-08 12:23:42.216610 1381227822.216610
Output for 5.5.2
2013-10-08 12:23:42.926705 1381227822.926705
Output for 5.5.1
2013-10-08 12:23:42.561794 1381227822.561794
Output for 5.5.0
2013-10-08 12:23:42.921332 1381227822.921332
Output for 5.4.45
2013-10-08 12:23:42.938794 1381227822.938794
Output for 5.4.44
2013-10-08 12:23:42.948875 1381227822.948875
Output for 5.4.43
2013-10-08 12:23:42.779650 1381227822.779650
Output for 5.4.42
2013-10-08 12:23:42.384170 1381227822.384170
Output for 5.4.41
2013-10-08 12:23:42.922149 1381227822.922149
Output for 5.4.40
2013-10-08 12:23:42.199171 1381227822.199171
Output for 5.4.39
2013-10-08 12:23:42.401350 1381227822.401350
Output for 5.4.38
2013-10-08 12:23:42.958313 1381227822.958313
Output for 5.4.37
2013-10-08 12:23:42.433781 1381227822.433781
Output for 5.4.36
2013-10-08 12:23:42.576388 1381227822.576388
Output for 5.4.35
2013-10-08 12:23:42.792505 1381227822.792505
Output for 5.4.34
2013-10-08 12:23:42.145205 1381227822.145205
Output for 5.4.32
2013-10-08 12:23:42.989230 1381227822.989230
Output for 5.4.31
2013-10-08 12:23:42.624055 1381227822.624055
Output for 5.4.30
2013-10-08 12:23:42.308714 1381227822.308714
Output for 5.4.29
2013-10-08 12:23:42. 52739 Fatal error: Call to a member function format() on a non-object in /in/V8a9A on line 9
Process exited with code 255.
Output for 5.4.28
2013-10-08 12:23:42.178207 1381227822.178207
Output for 5.4.27
2013-10-08 12:23:42.576187 1381227822.576187
Output for 5.4.26
2013-10-08 12:23:42.463873 1381227822.463873
Output for 5.4.25
2013-10-08 12:23:42.868021 1381227822.868021
Output for 5.4.24
2013-10-08 12:23:42.940636 1381227822.940636
Output for 5.4.23
2013-10-08 12:23:42.960644 1381227822.960644
Output for 5.4.22
2013-10-08 12:23:42.596230 1381227822.596230
Output for 5.4.21
2013-10-08 12:23:42.326276 1381227822.326276
Output for 5.4.20
2013-10-08 12:23:42. 73731 Fatal error: Call to a member function format() on a non-object in /in/V8a9A on line 9
Process exited with code 255.
Output for 5.4.19
2013-10-08 12:23:42.339752 1381227822.339752
Output for 5.4.18
2013-10-08 12:23:42.712934 1381227822.712934
Output for 5.4.17
2013-10-08 12:23:42.279192 1381227822.279192
Output for 5.4.16
2013-10-08 12:23:42.806498 1381227822.806498
Output for 5.4.15
2013-10-08 12:23:42.408345 1381227822.408345
Output for 5.4.14
2013-10-08 12:23:42.118606 1381227822.118606
Output for 5.4.13
2013-10-08 12:23:42.759259 1381227822.759259
Output for 5.4.12
2013-10-08 12:23:42. 4772 Fatal error: Call to a member function format() on a non-object in /in/V8a9A on line 9
Process exited with code 255.
Output for 5.4.11
2013-10-08 12:23:42.274314 1381227822.274314
Output for 5.4.10
2013-10-08 12:23:42.809372 1381227822.809372
Output for 5.4.9
2013-10-08 12:23:42.377037 1381227822.377037
Output for 5.4.8
2013-10-08 12:23:42.680111 1381227822.680111
Output for 5.4.7
2013-10-08 12:23:42.117128 1381227822.117128
Output for 5.4.6
2013-10-08 12:23:42.275373 1381227822.275373
Output for 5.4.5
2013-10-08 12:23:42.231811 1381227822.231811
Output for 5.4.4
2013-10-08 12:23:42.958708 1381227822.958708
Output for 5.4.3
2013-10-08 12:23:42.704039 1381227822.704039
Output for 5.4.2
2013-10-08 12:23:42.267832 1381227822.267832
Output for 5.4.1
2013-10-08 12:23:42.819225 1381227822.819225
Output for 5.4.0
2013-10-08 12:23:42.988651 1381227822.988651
Output for 5.3.29
2013-10-08 12:23:42.227303 1381227822.227303
Output for 5.3.28
2013-10-08 12:23:42.209841 1381227822.209841
Output for 5.3.27
2013-10-08 12:23:42.146822 1381227822.146822
Output for 5.3.26
2013-10-08 12:23:42.983454 1381227822.983454
Output for 5.3.25
2013-10-08 12:23:42.534914 1381227822.534914
Output for 5.3.24
2013-10-08 12:23:42.681598 1381227822.681598
Output for 5.3.23
2013-10-08 12:23:42.400981 1381227822.400981
Output for 5.3.22
2013-10-08 12:23:42.111185 1381227822.111185
Output for 5.3.21
2013-10-08 12:23:42.834660 1381227822.834660
Output for 5.3.20
2013-10-08 12:23:42.938702 1381227822.938702
Output for 5.3.19
2013-10-08 12:23:42.230816 1381227822.230816
Output for 5.3.18
2013-10-08 12:23:42.711881 1381227822.711881
Output for 5.3.17
2013-10-08 12:23:42.651172 1381227822.651172
Output for 5.3.16
2013-10-08 12:23:42.528231 1381227822.528231
Output for 5.3.15
2013-10-08 12:23:42.337524 1381227822.337524
Output for 5.3.14
2013-10-08 12:23:42.336304 1381227822.336304
Output for 5.3.13
2013-10-08 12:23:42.220426 1381227822.220426
Output for 5.3.12
2013-10-08 12:23:42.856464 1381227822.856464
Output for 5.3.11
2013-10-08 12:23:42.553227 1381227822.553227
Output for 5.3.10
2013-10-08 12:23:42.561290 1381227822.561290
Output for 5.3.9
2013-10-08 12:23:42.231933 1381227822.231933
Output for 5.3.8
2013-10-08 12:23:42.869654 1381227822.869654
Output for 5.3.7
2013-10-08 12:23:42.725749 1381227822.725749
Output for 5.3.6
2013-10-08 12:23:42.449465 1381227822.449465
Output for 5.3.5
2013-10-08 12:23:42.142600 1381227822.142600
Output for 5.3.4
2013-10-08 12:23:42.792347 1381227822.792347
Output for 5.3.3
2013-10-08 12:23:42.370612 1381227822.370612
Output for 5.3.2
2013-10-08 12:23:42.408101 1381227822.408101
Output for 5.3.1
2013-10-08 12:23:42.763910 1381227822.763910
Output for 5.3.0
2013-10-08 12:23:42.932835 Fatal error: Call to a member function format() on a non-object in /in/V8a9A on line 9
Process exited with code 255.
Output for 5.2.17
2013-10-08 12:23:42.774837 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.16
2013-10-08 12:23:42.333632 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.15
2013-10-08 12:23:42. 5449 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.14
2013-10-08 12:23:42.675276 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.13
2013-10-08 12:23:42.217317 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.12
2013-10-08 12:23:42.452162 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.11
2013-10-08 12:23:42.288016 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.10
2013-10-08 12:23:42.146656 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.9
2013-10-08 12:23:42.575489 Fatal error: Call to undefined method DateTime::createfromformat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.8
2013-10-08 12:23:42.481762 Fatal error: Call to undefined method DateTime::createfromformat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.7
2013-10-08 12:23:42.734931 Fatal error: Call to undefined method DateTime::createfromformat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.6
2013-10-08 12:23:42.278207 Fatal error: Call to undefined method DateTime::createfromformat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.5
2013-10-08 12:23:42.847717 Fatal error: Call to undefined method DateTime::createfromformat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.4
2013-10-08 12:23:42. 49641 Fatal error: Call to undefined method DateTime::createfromformat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.3
2013-10-08 12:23:42. 98765 Fatal error: Call to undefined method DateTime::createfromformat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.2
2013-10-08 12:23:42.845186 Fatal error: Call to undefined method DateTime::createfromformat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.1
2013-10-08 12:23:42.364087 Fatal error: Call to undefined method DateTime::createfromformat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.2.0
2013-10-08 12:23:42.198395 Fatal error: Call to undefined method DateTime::createfromformat() in /in/V8a9A on line 8
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/V8a9A on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/V8a9A on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/V8a9A on line 2