3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $Now = new DateTime(); echo $Now->format('Y-m-d H:i:s') . '<br>'; // 2014-06-12 $Duration = new DateInterval('PT1M'); // 1minute $Now->add( $Duration ); echo $Now->format('Y-m-d H:i:s') . '<br>'; // 2014-07-12 $Duration = new DateInterval('P1D'); // 1Day $Now->add( $Duration ); echo $Now->format('Y-m-d H:i:s') . '<br>'; // 2014-05-12
based on De6bP
Output for 5.6.28, 7.0.20 - 7.2.0
2015-12-02 21:30:56<br>2015-12-02 21:31:56<br>2015-12-03 21:31:56<br>
Output for 7.0.6
2016-05-03 19:56:53<br>2016-05-03 19:57:53<br>2016-05-04 19:57:53<br>
Output for 7.0.5
2016-04-03 08:16:22<br>2016-04-03 08:17:22<br>2016-04-04 08:17:22<br>
Output for 7.0.4
2016-03-10 20:11:16<br>2016-03-10 20:12:16<br>2016-03-11 20:12:16<br>
Output for 7.0.3
2016-03-18 21:32:54<br>2016-03-18 21:33:54<br>2016-03-19 21:33:54<br>
Output for 7.0.2
2016-03-23 03:46:54<br>2016-03-23 03:47:54<br>2016-03-24 03:47:54<br>
Output for 7.0.1
2016-03-24 07:03:05<br>2016-03-24 07:04:05<br>2016-03-25 07:04:05<br>
Output for 7.0.0
2016-03-27 08:57:23<br>2016-03-27 08:58:23<br>2016-03-28 08:58:23<br>
Output for 5.6.21
2016-05-02 15:05:26<br>2016-05-02 15:06:26<br>2016-05-03 15:06:26<br>
Output for 5.6.20
2016-04-10 07:17:45<br>2016-04-10 07:18:45<br>2016-04-11 07:18:45<br>
Output for 5.6.19
2016-03-08 04:24:18<br>2016-03-08 04:25:18<br>2016-03-09 04:25:18<br>
Output for 5.6.18
2016-03-15 13:14:43<br>2016-03-15 13:15:43<br>2016-03-16 13:15:43<br>
Output for 5.6.17
2016-03-20 00:49:22<br>2016-03-20 00:50:22<br>2016-03-21 00:50:22<br>
Output for 5.6.16
2016-03-28 09:46:28<br>2016-03-28 09:47:28<br>2016-03-29 09:47:28<br>
Output for 5.6.15
2016-03-29 10:35:55<br>2016-03-29 10:36:55<br>2016-03-30 10:36:55<br>
Output for 5.6.14
2016-04-14 16:17:01<br>2016-04-14 16:18:01<br>2016-04-15 16:18:01<br>
Output for 5.6.13
2016-04-15 16:57:20<br>2016-04-15 16:58:20<br>2016-04-16 16:58:20<br>
Output for 5.6.12
2016-04-20 07:24:25<br>2016-04-20 07:25:25<br>2016-04-21 07:25:25<br>
Output for 5.6.11
2016-04-24 13:49:16<br>2016-04-24 13:50:16<br>2016-04-25 13:50:16<br>
Output for 5.6.10
2016-04-25 15:53:02<br>2016-04-25 15:54:02<br>2016-04-26 15:54:02<br>
Output for 5.6.9
2016-04-27 21:01:28<br>2016-04-27 21:02:28<br>2016-04-28 21:02:28<br>
Output for 5.6.8
2016-04-30 05:52:03<br>2016-04-30 05:53:03<br>2016-05-01 05:53:03<br>
Output for 5.5.35
2016-05-23 00:05:34<br>2016-05-23 00:06:34<br>2016-05-24 00:06:34<br>
Output for 5.5.34
2016-04-11 09:29:06<br>2016-04-11 09:30:06<br>2016-04-12 09:30:06<br>
Output for 5.5.33
2016-03-09 07:17:10<br>2016-03-09 07:18:10<br>2016-03-10 07:18:10<br>
Output for 5.5.32
2016-03-17 17:07:41<br>2016-03-17 17:08:41<br>2016-03-18 17:08:41<br>
Output for 5.5.31
2016-03-21 03:55:04<br>2016-03-21 03:56:04<br>2016-03-22 03:56:04<br>
Output for 5.5.30
2016-04-01 12:28:48<br>2016-04-01 12:29:48<br>2016-04-02 12:29:48<br>
Output for 5.5.29
2016-04-17 07:15:26<br>2016-04-17 07:16:26<br>2016-04-18 07:16:26<br>
Output for 5.5.28
2016-04-21 10:40:13<br>2016-04-21 10:41:13<br>2016-04-22 10:41:13<br>
Output for 5.5.27
2016-04-22 12:23:06<br>2016-04-22 12:24:06<br>2016-04-23 12:24:06<br>
Output for 5.5.26
2016-04-26 18:33:39<br>2016-04-26 18:34:39<br>2016-04-27 18:34:39<br>
Output for 5.5.25
2016-04-29 01:57:13<br>2016-04-29 01:58:13<br>2016-04-30 01:58:13<br>
Output for 5.5.24
2016-05-24 08:08:20<br>2016-05-24 08:09:20<br>2016-05-25 08:09:20<br>
Output for 5.4.44 - 5.4.45
2015-12-02 21:30:59<br>2015-12-02 21:31:59<br>2015-12-03 21:31:59<br>
Output for 5.4.43
2015-12-02 21:31:00<br>2015-12-02 21:32:00<br>2015-12-03 21:32:00<br>
Output for 5.4.41 - 5.4.42
2015-12-02 21:31:01<br>2015-12-02 21:32:01<br>2015-12-03 21:32:01<br>
Output for 5.4.40
2015-12-02 21:31:02<br>2015-12-02 21:32:02<br>2015-12-03 21:32:02<br>
Output for 5.4.38 - 5.4.39
2015-12-02 21:31:03<br>2015-12-02 21:32:03<br>2015-12-03 21:32:03<br>
Output for 5.4.35 - 5.4.37
2015-12-02 21:31:04<br>2015-12-02 21:32:04<br>2015-12-03 21:32:04<br>
Output for 5.4.34
2015-12-02 21:31:05<br>2015-12-02 21:32:05<br>2015-12-03 21:32:05<br>
Output for 5.3.29, 5.4.30 - 5.4.32
2015-12-02 21:31:06<br>2015-12-02 21:32:06<br>2015-12-03 21:32:06<br>
Output for 5.4.26 - 5.4.29
2015-12-02 21:31:07<br>2015-12-02 21:32:07<br>2015-12-03 21:32:07<br>
Output for 5.3.28, 5.4.23 - 5.4.25
2015-12-02 21:31:08<br>2015-12-02 21:32:08<br>2015-12-03 21:32:08<br>
Output for 5.4.19 - 5.4.22
2015-12-02 21:31:09<br>2015-12-02 21:32:09<br>2015-12-03 21:32:09<br>
Output for 5.3.27, 5.4.17 - 5.4.18
2015-12-02 21:31:10<br>2015-12-02 21:32:10<br>2015-12-03 21:32:10<br>
Output for 5.3.24 - 5.3.26, 5.4.13 - 5.4.16
2015-12-02 21:31:11<br>2015-12-02 21:32:11<br>2015-12-03 21:32:11<br>
Output for 5.3.20 - 5.3.23, 5.4.10 - 5.4.12
2015-12-02 21:31:12<br>2015-12-02 21:32:12<br>2015-12-03 21:32:12<br>