3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new datetime; print_r($a); echo $a->date, "\n"; $a->modify("+10 days"); echo $a->date, "\n"; print_r($a);
based on 5g9Zn
Output for 7.3.0rc6
DateTime Object ( [date] => 2015-12-23 09:55:01.000198 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.000198 2015-12-23 09:55:01.000198 DateTime Object ( [date] => 2016-01-02 09:55:01.000198 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.0rc4
DateTime Object ( [date] => 2015-12-23 09:55:01.003132 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.003132 2015-12-23 09:55:01.003132 DateTime Object ( [date] => 2016-01-02 09:55:01.003132 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.0rc3
DateTime Object ( [date] => 2015-12-23 09:55:01.003274 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.003274 2015-12-23 09:55:01.003274 DateTime Object ( [date] => 2016-01-02 09:55:01.003274 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.0beta1
DateTime Object ( [date] => 2015-12-23 09:55:01.042363 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.042363 2015-12-23 09:55:01.042363 DateTime Object ( [date] => 2016-01-02 09:55:01.042363 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.3.0alpha1
DateTime Object ( [date] => 2015-12-23 09:55:01.002925 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.002925 2015-12-23 09:55:01.002925 DateTime Object ( [date] => 2016-01-02 09:55:01.002925 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.6
DateTime Object ( [date] => 2015-12-23 09:55:01.003185 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.003185 2015-12-23 09:55:01.003185 DateTime Object ( [date] => 2016-01-02 09:55:01.003185 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.2.0
DateTime Object ( [date] => 2015-12-23 09:55:01.003429 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.003429 2015-12-23 09:55:01.003429 DateTime Object ( [date] => 2016-01-02 09:55:01.003429 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.20
DateTime Object ( [date] => 2015-12-23 09:55:01.026391 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.026391 2015-12-23 09:55:01.026391 DateTime Object ( [date] => 2016-01-02 09:55:01.026391 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.10
DateTime Object ( [date] => 2015-12-23 09:55:01.003208 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.003208 2015-12-23 09:55:01.003208 DateTime Object ( [date] => 2016-01-02 09:55:01.003208 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.7
DateTime Object ( [date] => 2015-12-23 09:55:01.004671 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.004671 2015-12-23 09:55:01.004671 DateTime Object ( [date] => 2016-01-02 09:55:01.004671 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.6
DateTime Object ( [date] => 2015-12-23 09:55:01.012835 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.012835 2015-12-23 09:55:01.012835 DateTime Object ( [date] => 2016-01-02 09:55:01.012835 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.5
DateTime Object ( [date] => 2015-12-23 09:55:01.007179 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.007179 2015-12-23 09:55:01.007179 DateTime Object ( [date] => 2016-01-02 09:55:01.007179 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.1.0
DateTime Object ( [date] => 2015-12-23 09:55:01.003971 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.003971 2015-12-23 09:55:01.003971 DateTime Object ( [date] => 2016-01-02 09:55:01.003971 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.28, 7.0.20
DateTime Object ( [date] => 2015-12-23 09:55:01.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:01.000000 2015-12-23 09:55:01.000000 DateTime Object ( [date] => 2016-01-02 09:55:01.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-05-21 12:55:48.000000 DateTime Object ( [date] => 2016-05-31 12:55:48.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.5
DateTime Object ( [date] => 2016-04-03 09:01:26.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-03 09:01:26.000000 2016-04-03 09:01:26.000000 DateTime Object ( [date] => 2016-04-13 09:01:26.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-03-10 21:06:34.000000 DateTime Object ( [date] => 2016-03-20 21:06:34.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.3
DateTime Object ( [date] => 2016-03-18 22:27:14.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-18 22:27:14.000000 2016-03-18 22:27:14.000000 DateTime Object ( [date] => 2016-03-28 22:27:14.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.2
DateTime Object ( [date] => 2016-03-23 04:41:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-23 04:41:07.000000 2016-03-23 04:41:07.000000 DateTime Object ( [date] => 2016-04-02 04:41:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.1
DateTime Object ( [date] => 2016-03-24 07:50:59.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-24 07:50:59.000000 2016-03-24 07:50:59.000000 DateTime Object ( [date] => 2016-04-03 07:50:59.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.0
DateTime Object ( [date] => 2016-03-27 09:44:37.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-27 09:44:37.000000 2016-03-27 09:44:37.000000 DateTime Object ( [date] => 2016-04-06 09:44:37.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.21
DateTime Object ( [date] => 2016-05-02 15:53:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-05-02 15:53:29.000000 2016-05-02 15:53:29.000000 DateTime Object ( [date] => 2016-05-12 15:53:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.20
DateTime Object ( [date] => 2016-04-10 08:03:13.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-10 08:03:13.000000 2016-04-10 08:03:13.000000 DateTime Object ( [date] => 2016-04-20 08:03:13.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-03-08 05:13:48.000000 DateTime Object ( [date] => 2016-03-18 05:13:48.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-03-15 14:08:21.000000 DateTime Object ( [date] => 2016-03-25 14:08:21.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.17
DateTime Object ( [date] => 2016-03-20 01:41:23.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-20 01:41:23.000000 2016-03-20 01:41:23.000000 DateTime Object ( [date] => 2016-03-30 01:41:23.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.16
DateTime Object ( [date] => 2016-03-28 10:34:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-28 10:34:07.000000 2016-03-28 10:34:07.000000 DateTime Object ( [date] => 2016-04-07 10:34:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-03-29 11:23:07.000000 DateTime Object ( [date] => 2016-04-08 11:23:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-04-14 17:04:54.000000 DateTime Object ( [date] => 2016-04-24 17:04:54.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-04-15 17:44:33.000000 DateTime Object ( [date] => 2016-04-25 17:44:33.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-04-20 08:13:20.000000 DateTime Object ( [date] => 2016-04-30 08:13:20.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-04-24 14:38:44.000000 DateTime Object ( [date] => 2016-05-04 14:38:44.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.10
DateTime Object ( [date] => 2016-04-25 16:44:05.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-25 16:44:05.000000 2016-04-25 16:44:05.000000 DateTime Object ( [date] => 2016-05-05 16:44:05.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.9
DateTime Object ( [date] => 2016-04-27 21:52:22.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-27 21:52:22.000000 2016-04-27 21:52:22.000000 DateTime Object ( [date] => 2016-05-07 21:52:22.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.8
DateTime Object ( [date] => 2016-04-30 06:40:31.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-30 06:40:31.000000 2016-04-30 06:40:31.000000 DateTime Object ( [date] => 2016-05-10 06:40:31.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.35
DateTime Object ( [date] => 2016-05-23 01:23:27.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-05-23 01:23:27.000000 2016-05-23 01:23:27.000000 DateTime Object ( [date] => 2016-06-02 01:23:27.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.34
DateTime Object ( [date] => 2016-04-11 10:16:39.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-11 10:16:39.000000 2016-04-11 10:16:39.000000 DateTime Object ( [date] => 2016-04-21 10:16:39.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.33
DateTime Object ( [date] => 2016-03-09 08:12:44.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-09 08:12:44.000000 2016-03-09 08:12:44.000000 DateTime Object ( [date] => 2016-03-19 08:12:44.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.32
DateTime Object ( [date] => 2016-03-17 18:04:03.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-17 18:04:03.000000 2016-03-17 18:04:03.000000 DateTime Object ( [date] => 2016-03-27 18:04:03.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.31
DateTime Object ( [date] => 2016-03-21 04:49:30.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-03-21 04:49:30.000000 2016-03-21 04:49:30.000000 DateTime Object ( [date] => 2016-03-31 04:49:30.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.30
DateTime Object ( [date] => 2016-04-01 13:15:56.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-01 13:15:56.000000 2016-04-01 13:15:56.000000 DateTime Object ( [date] => 2016-04-11 13:15:56.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-04-17 08:02:12.000000 DateTime Object ( [date] => 2016-04-27 08:02:12.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.28
DateTime Object ( [date] => 2016-04-21 11:31:23.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-21 11:31:23.000000 2016-04-21 11:31:23.000000 DateTime Object ( [date] => 2016-05-01 11:31:23.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-04-22 13:10:52.000000 DateTime Object ( [date] => 2016-05-02 13:10:52.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-04-26 19:23:07.000000 DateTime Object ( [date] => 2016-05-06 19:23:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.25
DateTime Object ( [date] => 2016-04-29 02:48:37.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2016-04-29 02:48:37.000000 2016-04-29 02:48:37.000000 DateTime Object ( [date] => 2016-05-09 02:48:37.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
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.000000 2016-05-24 09:14:30.000000 DateTime Object ( [date] => 2016-06-03 09:14:30.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.44 - 5.4.45
DateTime Object ( [date] => 2015-12-23 09:55:05.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:05.000000 2015-12-23 09:55:05.000000 DateTime Object ( [date] => 2016-01-02 09:55:05.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.41 - 5.4.43
DateTime Object ( [date] => 2015-12-23 09:55:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:07.000000 2015-12-23 09:55:07.000000 DateTime Object ( [date] => 2016-01-02 09:55:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.40
DateTime Object ( [date] => 2015-12-23 09:55:08.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:08.000000 2015-12-23 09:55:08.000000 DateTime Object ( [date] => 2016-01-02 09:55:08.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.37 - 5.4.39
DateTime Object ( [date] => 2015-12-23 09:55:09.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:09.000000 2015-12-23 09:55:09.000000 DateTime Object ( [date] => 2016-01-02 09:55:09.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.35 - 5.4.36
DateTime Object ( [date] => 2015-12-23 09:55:10.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:10.000000 2015-12-23 09:55:10.000000 DateTime Object ( [date] => 2016-01-02 09:55:10.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.32 - 5.4.34
DateTime Object ( [date] => 2015-12-23 09:55:11.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:11.000000 2015-12-23 09:55:11.000000 DateTime Object ( [date] => 2016-01-02 09:55:11.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.30 - 5.4.31
DateTime Object ( [date] => 2015-12-23 09:55:12.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:12.000000 2015-12-23 09:55:12.000000 DateTime Object ( [date] => 2016-01-02 09:55:12.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.29, 5.4.28 - 5.4.29
DateTime Object ( [date] => 2015-12-23 09:55:12 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:12 2015-12-23 09:55:12 DateTime Object ( [date] => 2016-01-02 09:55:12 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.25 - 5.4.27
DateTime Object ( [date] => 2015-12-23 09:55:13 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:13 2015-12-23 09:55:13 DateTime Object ( [date] => 2016-01-02 09:55:13 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.28, 5.4.20 - 5.4.24
DateTime Object ( [date] => 2015-12-23 09:55:14 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:14 2015-12-23 09:55:14 DateTime Object ( [date] => 2016-01-02 09:55:14 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.27, 5.4.17 - 5.4.19
DateTime Object ( [date] => 2015-12-23 09:55:15 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:15 2015-12-23 09:55:15 DateTime Object ( [date] => 2016-01-02 09:55:15 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.23 - 5.3.26, 5.4.13 - 5.4.16
DateTime Object ( [date] => 2015-12-23 09:55:16 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:16 2015-12-23 09:55:16 DateTime Object ( [date] => 2016-01-02 09:55:16 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.21 - 5.3.22, 5.4.11 - 5.4.12
DateTime Object ( [date] => 2015-12-23 09:55:17 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) 2015-12-23 09:55:17 2015-12-23 09:55:17 DateTime Object ( [date] => 2016-01-02 09:55:17 [timezone_type] => 3 [timezone] => Europe/Amsterdam )