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 $dt->getTimestamp();
Output for 7.1.0
2014-03-11 03:15:33.0056531394504133
Output for 5.6.28, 7.0.14
2014-03-11 03:15:33.0000001394504133
Output for 7.0.6
2016-05-03 02:12:21.0000001462234341
Output for 7.0.5
2016-04-02 15:27:34.0000001459603654
Output for 7.0.4
2016-03-10 00:55:51.0000001457567751
Output for 7.0.3
2016-03-18 01:08:05.0000001458259685
Output for 7.0.2
2016-03-21 11:43:11.0000001458556991
Output for 7.0.1
2016-03-23 11:54:55.0000001458730495
Output for 7.0.0
2016-03-26 14:26:15.0000001458998775
Output for hhvm-3.12.0
2016-03-11 05:29:19.0000001457670559
Output for hhvm-3.10.0
2016-03-29 19:22:18.0000001459272138
Output for 5.6.21
2016-05-01 21:14:41.0000001462130081
Output for 5.6.20
2016-04-09 10:42:22.0000001460191342
Output for 5.6.19
2016-03-06 23:11:10.0000001457302270
Output for 5.6.18
2016-03-14 10:51:12.0000001457949072
Output for 5.6.17
2016-03-19 05:37:03.0000001458362223
Output for 5.6.16
2016-03-27 16:11:19.0000001459087879
Output for 5.6.15
2016-03-28 17:04:55.0000001459177495
Output for 5.6.14
2016-04-01 19:43:25.0000001459532605
Output for 5.6.13
2016-04-14 23:31:20.0000001460669480
Output for 5.6.12
2016-04-19 12:39:36.0000001461062376
Output for 5.6.11
2016-04-22 19:55:42.0000001461347742
Output for 5.6.10
2016-04-24 21:35:43.0000001461526543
Output for 5.6.9
2016-04-27 02:44:51.0000001461717891
Output for 5.6.8
2016-04-29 10:20:04.0000001461918004
Output for 5.6.7
2016-05-24 21:00:28.0000001464116428
Output for 5.5.35
2016-05-22 00:35:00.0000001463870100
Output for 5.5.34
2016-04-10 16:38:03.0000001460299083
Output for 5.5.33
2016-03-08 11:50:00.0000001457434200
Output for 5.5.32
2016-03-16 17:30:38.0000001458145838
Output for 5.5.31
2016-03-20 08:30:02.0000001458459002
Output for 5.5.30
2016-03-31 19:06:20.0000001459443980
Output for 5.5.29
2016-04-16 13:38:04.0000001460806684
Output for 5.5.28
2016-04-20 15:54:01.0000001461160441
Output for 5.5.27
2016-04-21 18:27:28.0000001461256048
Output for 5.5.26
2016-04-25 23:53:05.0000001461621185
Output for 5.5.25
2016-04-28 06:01:16.0000001461816076
Output for 5.5.24
2016-04-30 13:32:35.0000001462015955
Output for 5.4.45
2015-09-14 04:15:55.0000001442196955
Output for 5.4.44
2015-09-14 04:15:52.0000001442196952
Output for 5.4.43
2015-09-14 04:15:49.0000001442196949
Output for 5.4.42
2015-09-14 04:15:47.0000001442196947
Output for 5.4.41
2015-09-14 04:15:45.0000001442196945
Output for 5.4.40
2015-05-10 16:55:36.0000001431269736
Output for 5.4.39
2015-05-10 16:55:35.0000001431269735
Output for 5.4.38
2015-03-02 13:41:20.0000001425300080
Output for 5.4.35 - 5.4.37
2015-02-08 09:36:32.0000001423384592
Output for 5.4.34
2015-02-08 09:36:31.0000001423384591
Output for 5.4.32
2014-09-07 09:06:48.0000001410073608
Output for 5.4.31
2014-09-07 09:06:45.0000001410073605
Output for 5.3.29, 5.4.30
2014-09-07 09:06:41.0000001410073601
Output for 5.4.28 - 5.4.29
2014-09-07 09:06:40.0000001410073600
Output for 5.4.27
2014-09-07 09:06:46.0000001410073606
Output for 5.4.10 - 5.4.26
2014-03-11 03:15:34.0000001394504134
Output for 5.3.17 - 5.3.28, 5.4.0 - 5.4.9
2014-03-11 03:15:35.0000001394504135
Output for 5.3.0 - 5.3.16
2014-03-11 03:15:36.0000001394504136
Output for 5.2.12 - 5.2.17
2014-03-11 03:15:36.000000 Fatal error: Call to undefined method DateTime::getTimestamp() in /in/Ebdi9 on line 4
Process exited with code 255.
Output for 5.2.2 - 5.2.11
2014-03-11 03:15:37.000000 Fatal error: Call to undefined method DateTime::getTimestamp() in /in/Ebdi9 on line 4
Process exited with code 255.
Output for 5.2.0 - 5.2.1
2014-03-11 03:15:37.u Fatal error: Call to undefined method DateTime::getTimestamp() in /in/Ebdi9 on line 4
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/Ebdi9 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/Ebdi9 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/Ebdi9 on line 2