3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime("2 days ago 8pm"); echo $date->format('Y-m-d H:i:s'); $date = new DateTime("30 minutes"); echo $date->format('Y-m-d H:i:s');
based on SufEd
Output for 5.6.28, 7.0.20 - 7.2.0
2016-01-09 20:00:002016-01-11 18:05:56
Output for 7.0.6
2016-05-19 20:00:002016-05-21 14:08:29
Output for 7.0.5
2016-04-01 20:00:002016-04-03 10:07:48
Output for 7.0.4
2016-03-08 20:00:002016-03-10 22:14:24
Output for 7.0.3
2016-03-16 20:00:002016-03-18 23:40:45
Output for 7.0.2
2016-03-21 20:00:002016-03-23 05:54:04
Output for 7.0.1
2016-03-22 20:00:002016-03-24 08:59:17
Output for 7.0.0
2016-03-25 20:00:002016-03-27 10:52:30
Output for 5.6.21
2016-04-30 20:00:002016-05-02 17:01:30
Output for 5.6.20
2016-04-08 20:00:002016-04-10 09:09:52
Output for 5.6.19
2016-03-06 20:00:002016-03-08 06:23:29
Output for 5.6.18
2016-03-13 20:00:002016-03-15 15:21:20
Output for 5.6.17
2016-03-18 20:00:002016-03-20 02:53:58
Output for 5.6.16
2016-03-26 20:00:002016-03-28 11:42:07
Output for 5.6.15
2016-03-27 20:00:002016-03-29 12:31:09
Output for 5.6.14
2016-04-12 20:00:002016-04-14 18:14:05
Output for 5.6.13
2016-04-13 20:00:002016-04-15 18:53:07
Output for 5.6.12
2016-04-18 20:00:002016-04-20 09:22:26
Output for 5.6.11
2016-04-22 20:00:002016-04-24 15:48:32
Output for 5.6.10
2016-04-23 20:00:002016-04-25 17:54:28
Output for 5.6.9
2016-04-25 20:00:002016-04-27 23:20:31
Output for 5.6.8
2016-04-28 20:00:002016-04-30 07:49:47
Output for 5.5.35
2016-05-21 20:00:002016-05-23 03:03:22
Output for 5.5.34
2016-04-09 20:00:002016-04-11 11:23:46
Output for 5.5.33
2016-03-07 20:00:002016-03-09 09:22:38
Output for 5.5.32
2016-03-15 20:00:002016-03-17 19:18:44
Output for 5.5.31
2016-03-19 20:00:002016-03-21 06:04:26
Output for 5.5.30
2016-03-30 20:00:002016-04-01 14:23:08
Output for 5.5.29
2016-04-15 20:00:002016-04-17 09:10:49
Output for 5.5.28
2016-04-19 20:00:002016-04-21 12:41:57
Output for 5.5.27
2016-04-20 20:00:002016-04-22 14:18:59
Output for 5.5.26
2016-04-24 20:00:002016-04-26 20:35:46
Output for 5.5.25
2016-04-27 20:00:002016-04-29 04:01:35
Output for 5.5.24
2016-05-22 20:00:002016-05-24 10:24:16
Output for 5.4.45
2016-01-09 20:00:002016-01-11 18:05:59
Output for 5.4.44
2016-01-09 20:00:002016-01-11 18:06:00
Output for 5.4.42 - 5.4.43
2016-01-09 20:00:002016-01-11 18:06:01
Output for 5.4.41
2016-01-09 20:00:002016-01-11 18:06:02
Output for 5.4.40
2016-01-09 20:00:002016-01-11 18:06:03
Output for 5.4.38 - 5.4.39
2016-01-09 20:00:002016-01-11 18:06:04
Output for 5.4.36 - 5.4.37
2016-01-09 20:00:002016-01-11 18:06:05
Output for 5.4.34 - 5.4.35
2016-01-09 20:00:002016-01-11 18:06:06
Output for 5.3.29, 5.4.31 - 5.4.32
2016-01-09 20:00:002016-01-11 18:06:07
Output for 5.4.28 - 5.4.30
2016-01-09 20:00:002016-01-11 18:06:08
Output for 5.4.25 - 5.4.27
2016-01-09 20:00:002016-01-11 18:06:09
Output for 5.3.28, 5.4.22 - 5.4.24
2016-01-09 20:00:002016-01-11 18:06:10
Output for 5.4.19 - 5.4.21
2016-01-09 20:00:002016-01-11 18:06:11
Output for 5.3.26 - 5.3.27, 5.4.16 - 5.4.18
2016-01-09 20:00:002016-01-11 18:06:12
Output for 5.3.23 - 5.3.25, 5.4.12 - 5.4.15
2016-01-09 20:00:002016-01-11 18:06:13
Output for 5.3.21 - 5.3.22, 5.4.11
2016-01-09 20:00:002016-01-11 18:06:14