3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new datetime; print_r($a); print_r($a->date); $a->modify("+10 days"); print_r($a->date);
Output for 7.2.0
DateTime Object ( [date] => 2015-12-23 09:52:20.005174 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:20.0051742015-12-23 09:52:20.005174
Output for 7.1.10
DateTime Object ( [date] => 2015-12-23 09:52:20.003460 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:20.0034602015-12-23 09:52:20.003460
Output for 7.1.7
DateTime Object ( [date] => 2015-12-23 09:52:20.004819 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:20.0048192015-12-23 09:52:20.004819
Output for 7.1.6
DateTime Object ( [date] => 2015-12-23 09:52:20.012650 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:20.0126502015-12-23 09:52:20.012650
Output for 7.1.5
DateTime Object ( [date] => 2015-12-23 09:52:20.007832 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:20.0078322015-12-23 09:52:20.007832
Output for 7.1.0
DateTime Object ( [date] => 2015-12-23 09:52:20.004052 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:20.0040522015-12-23 09:52:20.004052
Output for 5.6.28, 7.0.20
DateTime Object ( [date] => 2015-12-23 09:52:20.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:20.0000002015-12-23 09:52:20.000000
Output for 7.0.6
DateTime Object ( [date] => 2016-05-21 12:55:48.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-05-21 12:55:48.0000002016-05-21 12:55:48.000000
Output for 7.0.5
DateTime Object ( [date] => 2016-04-03 09:01:25.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-03 09:01:25.0000002016-04-03 09:01:25.000000
Output for 7.0.4
DateTime Object ( [date] => 2016-03-10 21:06:34.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-10 21:06:34.0000002016-03-10 21:06:34.000000
Output for 7.0.3
DateTime Object ( [date] => 2016-03-18 22:27:13.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-18 22:27:13.0000002016-03-18 22:27:13.000000
Output for 7.0.2
DateTime Object ( [date] => 2016-03-23 04:41:06.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-23 04:41:06.0000002016-03-23 04:41:06.000000
Output for 7.0.1
DateTime Object ( [date] => 2016-03-24 07:50:58.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-24 07:50:58.0000002016-03-24 07:50:58.000000
Output for 7.0.0
DateTime Object ( [date] => 2016-03-27 09:44:36.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-27 09:44:36.0000002016-03-27 09:44:36.000000
Output for 5.6.21
DateTime Object ( [date] => 2016-05-02 15:53:28.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-05-02 15:53:28.0000002016-05-02 15:53:28.000000
Output for 5.6.20
DateTime Object ( [date] => 2016-04-10 08:03:12.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-10 08:03:12.0000002016-04-10 08:03:12.000000
Output for 5.6.19
DateTime Object ( [date] => 2016-03-08 05:13:48.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-08 05:13:48.0000002016-03-08 05:13:48.000000
Output for 5.6.18
DateTime Object ( [date] => 2016-03-15 14:08:21.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-15 14:08:21.0000002016-03-15 14:08:21.000000
Output for 5.6.17
DateTime Object ( [date] => 2016-03-20 01:41:22.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-20 01:41:22.0000002016-03-20 01:41:22.000000
Output for 5.6.16
DateTime Object ( [date] => 2016-03-28 10:34:06.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-28 10:34:06.0000002016-03-28 10:34:06.000000
Output for 5.6.15
DateTime Object ( [date] => 2016-03-29 11:23:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-29 11:23:07.0000002016-03-29 11:23:07.000000
Output for 5.6.14
DateTime Object ( [date] => 2016-04-14 17:04:54.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-14 17:04:54.0000002016-04-14 17:04:54.000000
Output for 5.6.13
DateTime Object ( [date] => 2016-04-15 17:44:33.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-15 17:44:33.0000002016-04-15 17:44:33.000000
Output for 5.6.12
DateTime Object ( [date] => 2016-04-20 08:13:20.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-20 08:13:20.0000002016-04-20 08:13:20.000000
Output for 5.6.11
DateTime Object ( [date] => 2016-04-24 14:38:44.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-24 14:38:44.0000002016-04-24 14:38:44.000000
Output for 5.6.10
DateTime Object ( [date] => 2016-04-25 16:44:04.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-25 16:44:04.0000002016-04-25 16:44:04.000000
Output for 5.6.9
DateTime Object ( [date] => 2016-04-27 21:52:21.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-27 21:52:21.0000002016-04-27 21:52:21.000000
Output for 5.6.8
DateTime Object ( [date] => 2016-04-30 06:40:30.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-30 06:40:30.0000002016-04-30 06:40:30.000000
Output for 5.5.35
DateTime Object ( [date] => 2016-05-23 01:23:26.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-05-23 01:23:26.0000002016-05-23 01:23:26.000000
Output for 5.5.34
DateTime Object ( [date] => 2016-04-11 10:16:38.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-11 10:16:38.0000002016-04-11 10:16:38.000000
Output for 5.5.33
DateTime Object ( [date] => 2016-03-09 08:12:43.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-09 08:12:43.0000002016-03-09 08:12:43.000000
Output for 5.5.32
DateTime Object ( [date] => 2016-03-17 18:04:02.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-17 18:04:02.0000002016-03-17 18:04:02.000000
Output for 5.5.31
DateTime Object ( [date] => 2016-03-21 04:49:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-21 04:49:29.0000002016-03-21 04:49:29.000000
Output for 5.5.30
DateTime Object ( [date] => 2016-04-01 13:15:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-01 13:15:55.0000002016-04-01 13:15:55.000000
Output for 5.5.29
DateTime Object ( [date] => 2016-04-17 08:02:12.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-17 08:02:12.0000002016-04-17 08:02:12.000000
Output for 5.5.28
DateTime Object ( [date] => 2016-04-21 11:31:22.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-21 11:31:22.0000002016-04-21 11:31:22.000000
Output for 5.5.27
DateTime Object ( [date] => 2016-04-22 13:10:52.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-22 13:10:52.0000002016-04-22 13:10:52.000000
Output for 5.5.26
DateTime Object ( [date] => 2016-04-26 19:23:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-26 19:23:07.0000002016-04-26 19:23:07.000000
Output for 5.5.25
DateTime Object ( [date] => 2016-04-29 02:48:36.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-29 02:48:36.0000002016-04-29 02:48:36.000000
Output for 5.5.24
DateTime Object ( [date] => 2016-05-24 09:14:30.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-05-24 09:14:30.0000002016-05-24 09:14:30.000000
Output for 5.4.44 - 5.4.45
DateTime Object ( [date] => 2015-12-23 09:52:24.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:24.0000002015-12-23 09:52:24.000000
Output for 5.4.42 - 5.4.43
DateTime Object ( [date] => 2015-12-23 09:52:26.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:26.0000002015-12-23 09:52:26.000000
Output for 5.4.40 - 5.4.41
DateTime Object ( [date] => 2015-12-23 09:52:27.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:27.0000002015-12-23 09:52:27.000000
Output for 5.4.37 - 5.4.39
DateTime Object ( [date] => 2015-12-23 09:52:28.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:28.0000002015-12-23 09:52:28.000000
Output for 5.4.34 - 5.4.36
DateTime Object ( [date] => 2015-12-23 09:52:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:29.0000002015-12-23 09:52:29.000000
Output for 5.4.30 - 5.4.32
DateTime Object ( [date] => 2015-12-23 09:52:30.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:30.0000002015-12-23 09:52:30.000000
Output for 5.3.29, 5.4.29
DateTime Object ( [date] => 2015-12-23 09:52:30 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:302015-12-23 09:52:30
Output for 5.4.25 - 5.4.28
DateTime Object ( [date] => 2015-12-23 09:52:31 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:312015-12-23 09:52:31
Output for 5.3.28, 5.4.20 - 5.4.24
DateTime Object ( [date] => 2015-12-23 09:52:32 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:322015-12-23 09:52:32
Output for 5.3.27, 5.4.18 - 5.4.19
DateTime Object ( [date] => 2015-12-23 09:52:33 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:332015-12-23 09:52:33
Output for 5.3.24 - 5.3.26, 5.4.14 - 5.4.17
DateTime Object ( [date] => 2015-12-23 09:52:34 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:342015-12-23 09:52:34
Output for 5.3.21 - 5.3.23, 5.4.11 - 5.4.13
DateTime Object ( [date] => 2015-12-23 09:52:35 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:52:352015-12-23 09:52:35