3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime(); echo $dt->format('Y-m-d H:i:s.u'); echo "\n"; echo $dt->getTimestamp();
Output for 7.1.0
2014-03-11 03:16:03.004533 1394504163
Output for 7.0.14
2014-03-11 03:16:03.000000 1394504163
Output for 7.0.6
2016-05-03 02:12:21.000000 1462234341
Output for 7.0.5
2016-04-02 15:27:34.000000 1459603654
Output for 7.0.4
2016-03-10 00:55:50.000000 1457567750
Output for 7.0.3
2016-03-18 01:08:05.000000 1458259685
Output for 7.0.2
2016-03-21 11:43:10.000000 1458556990
Output for 7.0.1
2016-03-23 11:54:54.000000 1458730494
Output for 7.0.0
2016-03-26 14:26:15.000000 1458998775
Output for hhvm-3.12.0
2016-03-11 05:29:18.000000 1457670558
Output for hhvm-3.10.0
2016-03-29 19:22:18.000000 1459272138
Output for 5.6.21
2016-05-01 21:14:40.000000 1462130080
Output for 5.6.20
2016-04-09 10:42:22.000000 1460191342
Output for 5.6.19
2016-03-06 23:11:10.000000 1457302270
Output for 5.6.18
2016-03-14 10:51:11.000000 1457949071
Output for 5.6.17
2016-03-19 05:37:03.000000 1458362223
Output for 5.6.16
2016-03-27 16:11:18.000000 1459087878
Output for 5.6.15
2016-03-28 17:04:55.000000 1459177495
Output for 5.6.14
2016-04-01 19:43:24.000000 1459532604
Output for 5.6.13
2016-04-14 23:31:20.000000 1460669480
Output for 5.6.12
2016-04-19 12:39:36.000000 1461062376
Output for 5.6.11
2016-04-22 19:55:41.000000 1461347741
Output for 5.6.10
2016-04-24 21:35:43.000000 1461526543
Output for 5.6.9
2016-04-27 02:44:50.000000 1461717890
Output for 5.6.8
2016-04-29 10:20:04.000000 1461918004
Output for 5.6.7
2016-05-24 21:00:28.000000 1464116428
Output for 5.5.35
2016-05-22 00:34:59.000000 1463870099
Output for 5.5.34
2016-04-10 16:38:03.000000 1460299083
Output for 5.5.33
2016-03-08 11:50:00.000000 1457434200
Output for 5.5.32
2016-03-16 17:30:37.000000 1458145837
Output for 5.5.31
2016-03-20 08:30:01.000000 1458459001
Output for 5.5.30
2016-03-31 19:06:19.000000 1459443979
Output for 5.5.29
2016-04-16 13:38:04.000000 1460806684
Output for 5.5.28
2016-04-20 15:54:00.000000 1461160440
Output for 5.5.27
2016-04-21 18:27:27.000000 1461256047
Output for 5.5.26
2016-04-25 23:53:04.000000 1461621184
Output for 5.5.25
2016-04-28 06:01:15.000000 1461816075
Output for 5.5.24
2016-04-30 13:32:34.000000 1462015954
Output for 5.4.45
2015-09-14 04:18:38.000000 1442197118
Output for 5.4.44
2015-09-14 04:18:35.000000 1442197115
Output for 5.4.43
2015-09-14 04:18:32.000000 1442197112
Output for 5.4.42
2015-09-14 04:18:30.000000 1442197110
Output for 5.4.41
2015-09-14 04:18:28.000000 1442197108
Output for 5.4.39 - 5.4.40
2015-05-10 16:59:19.000000 1431269959
Output for 5.4.38
2015-03-02 13:42:56.000000 1425300176
Output for 5.4.37
2015-02-08 09:39:17.000000 1423384757
Output for 5.4.34 - 5.4.36
2015-02-08 09:39:16.000000 1423384756
Output for 5.4.32
2014-09-07 09:15:57.000000 1410074157
Output for 5.4.31
2014-09-07 09:15:52.000000 1410074152
Output for 5.3.29, 5.4.30
2014-09-07 09:15:47.000000 1410074147
Output for 5.4.28 - 5.4.29
2014-09-07 09:15:46.000000 1410074146
Output for 5.4.27
2014-09-07 09:15:53.000000 1410074153
Output for 5.4.9 - 5.4.26
2014-03-11 03:16:04.000000 1394504164
Output for 5.3.15 - 5.3.28, 5.4.0 - 5.4.8
2014-03-11 03:16:05.000000 1394504165
Output for 5.3.0 - 5.3.14
2014-03-11 03:16:06.000000 1394504166
Output for 5.2.10 - 5.2.17
2014-03-11 03:16:06.000000 Fatal error: Call to undefined method DateTime::getTimestamp() in /in/Xmup3 on line 5
Process exited with code 255.
Output for 5.2.2 - 5.2.9
2014-03-11 03:16:07.000000 Fatal error: Call to undefined method DateTime::getTimestamp() in /in/Xmup3 on line 5
Process exited with code 255.
Output for 5.2.0 - 5.2.1
2014-03-11 03:16:07.u Fatal error: Call to undefined method DateTime::getTimestamp() in /in/Xmup3 on line 5
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/Xmup3 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/Xmup3 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/Xmup3 on line 2