3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dt = new \DateTime(); var_dump(new \DateTime($dt->format('c')));
Output for 5.6.28, 7.0.14 - 7.1.0
object(DateTime)#2 (3) { ["date"]=> string(26) "2014-06-12 02:44:47.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 7.0.6
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-03 00:29:37.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 7.0.5
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-02 14:03:08.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 7.0.4
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-09 23:00:11.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 7.0.3
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-17 23:25:17.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 7.0.2
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-21 10:08:04.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 7.0.1
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-23 09:47:13.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 7.0.0
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-26 12:52:14.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for hhvm-3.12.0
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-11 02:37:55.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for hhvm-3.10.0
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-29 17:10:01.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.6.21
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-01 19:35:20.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.6.20
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-09 09:18:44.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.6.19
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-06 20:25:06.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 5.6.18
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-14 08:45:18.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 5.6.17
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-19 04:00:47.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 5.6.16
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-27 14:36:26.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.6.15
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-28 15:33:58.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.6.14
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-01 18:17:24.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.6.13
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-14 22:14:22.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.6.12
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-19 11:18:10.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.6.11
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-22 18:36:23.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.6.10
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-24 20:14:45.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.6.9
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-27 01:19:18.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.6.8
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-29 08:53:21.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.6.7
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-24 18:43:53.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.5.35
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-21 22:48:34.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.5.34
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-10 14:55:22.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.5.33
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-08 10:12:01.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 5.5.32
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-15 19:13:37.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 5.5.31
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-20 06:55:10.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 5.5.30
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-31 17:39:54.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.5.29
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-16 12:17:02.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.5.28
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-20 14:27:57.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.5.27
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-21 17:07:28.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.5.26
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-25 22:29:11.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.5.25
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-28 04:36:02.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.5.24
object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-30 12:15:01.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.4.45
object(DateTime)#2 (3) { ["date"]=> string(26) "2015-09-12 03:16:38.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.4.44
object(DateTime)#2 (3) { ["date"]=> string(26) "2015-09-12 03:16:35.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.4.43
object(DateTime)#2 (3) { ["date"]=> string(26) "2015-09-12 03:16:32.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.4.42
object(DateTime)#2 (3) { ["date"]=> string(26) "2015-07-08 18:30:40.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.4.41
object(DateTime)#2 (3) { ["date"]=> string(26) "2015-05-26 06:30:26.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.4.40
object(DateTime)#2 (3) { ["date"]=> string(26) "2015-05-02 07:44:18.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.4.39
object(DateTime)#2 (3) { ["date"]=> string(26) "2015-05-02 07:44:17.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.4.38
object(DateTime)#2 (3) { ["date"]=> string(26) "2015-02-28 22:32:27.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 5.4.37
object(DateTime)#2 (3) { ["date"]=> string(26) "2015-02-06 06:07:25.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 5.4.36
object(DateTime)#2 (3) { ["date"]=> string(26) "2015-02-06 06:07:24.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 5.4.34 - 5.4.35
object(DateTime)#2 (3) { ["date"]=> string(26) "2014-11-16 05:28:27.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" }
Output for 5.4.32
object(DateTime)#2 (3) { ["date"]=> string(26) "2014-09-04 01:42:50.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.4.31
object(DateTime)#2 (3) { ["date"]=> string(26) "2014-09-04 01:42:48.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.4.30
object(DateTime)#2 (3) { ["date"]=> string(26) "2014-09-04 01:42:45.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.4.17 - 5.4.29
object(DateTime)#2 (3) { ["date"]=> string(19) "2014-06-12 02:44:50" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.4.7 - 5.4.16
object(DateTime)#2 (3) { ["date"]=> string(19) "2014-06-12 02:44:51" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.3.23 - 5.3.28, 5.4.0 - 5.4.6
object(DateTime)#2 (3) { ["date"]=> string(19) "2014-06-12 02:44:52" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.3.29
object(DateTime)#2 (3) { ["date"]=> string(19) "2014-09-04 01:42:45" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.3.9 - 5.3.22
object(DateTime)#2 (3) { ["date"]=> string(19) "2014-06-12 02:44:53" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.3.0 - 5.3.8
object(DateTime)#2 (3) { ["date"]=> string(19) "2014-06-12 02:44:54" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" }
Output for 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/IoKOp on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/IoKOp on line 3 object(DateTime)#2 (0) { }
Output for 5.0.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/IoKOp on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/IoKOp on line 3 Fatal error: Class 'DateTime' not found in /in/IoKOp on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/IoKOp on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/IoKOp on line 3 Fatal error: Cannot instantiate non-existent class: datetime in /in/IoKOp on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/IoKOp on line 2 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/IoKOp on line 3 Fatal error: Cannot instantiate non-existent class: datetime in /in/IoKOp on line 2