3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(new \DateTime('now', new \DateTimeZone('etc/GMT')));
Output for 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:44.003051" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 7.1.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:44.003403" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 7.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:44.005028" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 7.1.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:44.012665" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 7.1.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:44.011115" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:44.003950" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.28, 7.0.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 7.0.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-21 10:54:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 7.0.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-03 07:00:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 7.0.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-10 20:05:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 7.0.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-18 21:26:09.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 7.0.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-23 03:39:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 7.0.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-24 06:50:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 7.0.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 07:43:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 13:52:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 06:02:11.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-08 04:12:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-15 13:07:09.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-20 00:40:20.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 08:33:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-29 09:22:09.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-14 15:03:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-15 15:43:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-20 06:12:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-24 12:37:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 14:42:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-27 19:51:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.6.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-30 04:39:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.5.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-22 23:22:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.5.34
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-11 08:15:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.5.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 07:11:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.5.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-17 17:02:48.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.5.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-21 03:48:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.5.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 11:14:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.5.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-17 06:01:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.5.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 09:30:10.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.5.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 11:09:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.5.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 17:22:08.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.5.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-29 00:47:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.5.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 07:13:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "etc/GMT" }
Output for 5.4.44 - 5.4.45
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.4.43
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:48.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.4.41 - 5.4.42
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.4.39 - 5.4.40
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.4.36 - 5.4.38
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:51.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.4.34 - 5.4.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:52.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.4.31 - 5.4.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:53.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.4.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:17:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.4.26 - 5.4.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-22 18:17:54" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.3.28, 5.4.23 - 5.4.25
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-22 18:17:55" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.4.20 - 5.4.22
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-22 18:17:56" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.3.26 - 5.3.27, 5.4.16 - 5.4.19
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-22 18:17:57" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.3.21 - 5.3.25, 5.4.12 - 5.4.15
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-22 18:17:58" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.4.11
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-22 18:17:59" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }
Output for 5.3.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-22 18:17:53" ["timezone_type"]=> int(3) ["timezone"]=> string(7) "Etc/GMT" }