3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = new DateTime('now'); print_r($x);
based on OK6f9
Output for 7.2.0
DateTime Object ( [date] => 2015-09-10 18:03:13.004143 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.10
DateTime Object ( [date] => 2015-09-10 18:03:13.006583 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.7
DateTime Object ( [date] => 2015-09-10 18:03:13.040675 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.6
DateTime Object ( [date] => 2015-09-10 18:03:13.011367 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.5
DateTime Object ( [date] => 2015-09-10 18:03:13.011677 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.0
DateTime Object ( [date] => 2015-09-10 18:03:13.004100 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.28, 7.0.20
DateTime Object ( [date] => 2015-09-10 18:03:13.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.6
DateTime Object ( [date] => 2016-05-03 19:04:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.5
DateTime Object ( [date] => 2016-04-03 07:27:46.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.4
DateTime Object ( [date] => 2016-03-10 19:17:49.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.3
DateTime Object ( [date] => 2016-03-18 20:31:53.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.2
DateTime Object ( [date] => 2016-03-23 02:39:43.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.1
DateTime Object ( [date] => 2016-03-24 06:11:28.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.0
DateTime Object ( [date] => 2016-03-27 08:07:03.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.21
DateTime Object ( [date] => 2016-05-02 14:13:13.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.20
DateTime Object ( [date] => 2016-04-10 06:27:26.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.19
DateTime Object ( [date] => 2016-03-08 03:29:27.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.18
DateTime Object ( [date] => 2016-03-15 12:16:31.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.17
DateTime Object ( [date] => 2016-03-19 23:52:31.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.16
DateTime Object ( [date] => 2016-03-28 08:54:15.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.15
DateTime Object ( [date] => 2016-03-29 09:45:06.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.14
DateTime Object ( [date] => 2016-04-02 11:34:06.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.13
DateTime Object ( [date] => 2016-04-15 16:03:28.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.12
DateTime Object ( [date] => 2016-04-20 06:31:42.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.11
DateTime Object ( [date] => 2016-04-24 12:55:02.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.10
DateTime Object ( [date] => 2016-04-25 14:57:13.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.9
DateTime Object ( [date] => 2016-04-27 20:07:18.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.8
DateTime Object ( [date] => 2016-04-30 04:59:24.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.35
DateTime Object ( [date] => 2016-05-22 22:19:12.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.34
DateTime Object ( [date] => 2016-04-11 08:39:01.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.33
DateTime Object ( [date] => 2016-03-09 06:16:51.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.32
DateTime Object ( [date] => 2016-03-17 16:09:01.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.31
DateTime Object ( [date] => 2016-03-21 02:56:21.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.30
DateTime Object ( [date] => 2016-04-01 11:38:28.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.29
DateTime Object ( [date] => 2016-04-17 06:24:14.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.28
DateTime Object ( [date] => 2016-04-21 09:46:05.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.27
DateTime Object ( [date] => 2016-04-22 11:30:59.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.26
DateTime Object ( [date] => 2016-04-26 17:39:54.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.25
DateTime Object ( [date] => 2016-04-29 00:57:06.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.24
DateTime Object ( [date] => 2016-05-24 07:13:00.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.45
DateTime Object ( [date] => 2015-11-19 20:48:25.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.44
DateTime Object ( [date] => 2015-11-19 20:48:26.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.43
DateTime Object ( [date] => 2015-11-19 20:48:27.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.41 - 5.4.42
DateTime Object ( [date] => 2015-11-19 20:48:28.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.40
DateTime Object ( [date] => 2015-11-19 20:48:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.38 - 5.4.39
DateTime Object ( [date] => 2015-11-19 20:48:30.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.35 - 5.4.37
DateTime Object ( [date] => 2015-11-19 20:48:31.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.34
DateTime Object ( [date] => 2015-11-19 20:48:32.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.31 - 5.4.32
DateTime Object ( [date] => 2015-11-19 20:48:33.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.30
DateTime Object ( [date] => 2015-11-19 20:48:34.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.27 - 5.4.29
DateTime Object ( [date] => 2015-11-19 20:48:34 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.24 - 5.4.26
DateTime Object ( [date] => 2015-11-19 20:48:35 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.28, 5.4.21 - 5.4.23
DateTime Object ( [date] => 2015-11-19 20:48:36 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.18 - 5.4.20
DateTime Object ( [date] => 2015-11-19 20:48:37 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.26 - 5.3.27, 5.4.16 - 5.4.17
DateTime Object ( [date] => 2015-11-19 20:48:38 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.23 - 5.3.25, 5.4.12 - 5.4.15
DateTime Object ( [date] => 2015-11-19 20:48:39 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.19 - 5.3.22, 5.4.9 - 5.4.11
DateTime Object ( [date] => 2015-11-19 20:48:40 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.17 - 5.3.18, 5.4.7 - 5.4.8
DateTime Object ( [date] => 2015-11-19 20:48:41 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.29
DateTime Object ( [date] => 2015-11-19 20:48:33 [timezone_type] => 3 [timezone] => Europe/Amsterdam )