3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(new \DateTime('now', new \DateTimeZone('GMT')));
based on jYFeY
Output for 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:00.002666" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 7.1.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:00.005065" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 7.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:00.005537" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 7.1.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:00.012448" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 7.1.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:00.008287" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:00.004044" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.28, 7.0.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 7.0.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-21 10:54:45.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 7.0.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-03 07:00:29.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 7.0.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-10 20:05:32.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 7.0.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-18 21:26:10.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 7.0.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-23 03:39:58.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 7.0.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-24 06:50:01.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 7.0.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 07:43:38.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 13:52:32.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 06:02:11.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-08 04:12:50.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-15 13:07:09.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-20 00:40:21.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 08:33:07.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-29 09:22:10.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-14 15:03:55.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-15 15:43:36.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-20 06:12:14.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-24 12:37:38.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 14:42:55.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-27 19:51:07.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.6.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-30 04:39:26.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.5.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-22 23:22:14.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.5.34
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-11 08:15:42.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.5.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 07:11:42.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.5.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-17 17:02:48.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.5.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-21 03:48:23.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.5.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 11:14:56.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.5.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-17 06:01:06.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.5.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 09:30:11.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.5.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 11:09:56.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.5.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 17:22:09.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.5.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-29 00:47:40.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.5.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 07:13:14.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" }
Output for 5.4.45
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }
Output for 5.4.44
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }
Output for 5.4.41 - 5.4.43
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:05.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }
Output for 5.4.38 - 5.4.40
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }
Output for 5.4.34 - 5.4.37
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }
Output for 5.4.30 - 5.4.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-22 18:18:08.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }
Output for 5.3.29, 5.4.28 - 5.4.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-22 18:18:08" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }
Output for 5.3.28, 5.4.23 - 5.4.27
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-22 18:18:09" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }
Output for 5.3.27, 5.4.17 - 5.4.22
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-22 18:18:10" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }
Output for 5.3.21 - 5.3.26, 5.4.12 - 5.4.16
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-22 18:18:11" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }
Output for 5.4.11
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-12-22 18:18:12" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }