3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dd = new DateTime(); $di = new DateInterval('P7D'); $dd->add($di); echo $dd->format('d-m-Y');
based on MQg6d
Output for 5.3.0 - 5.4.32, 5.6.28, 7.0.14 - 7.1.0
07-10-2014
Output for 7.0.6
10-05-2016
Output for 5.6.14, 7.0.5
09-04-2016
Output for 7.0.4
17-03-2016
Output for 7.0.3
25-03-2016
Output for 7.0.2
29-03-2016
Output for 7.0.1
30-03-2016
Output for 7.0.0
02-04-2016
Output for hhvm-3.12.0
18-03-2016
Output for hhvm-3.10.0
06-04-2016
Output for 5.6.21
09-05-2016
Output for 5.6.20
16-04-2016
Output for 5.6.19
14-03-2016
Output for 5.6.18
21-03-2016
Output for 5.6.17
26-03-2016
Output for 5.6.16
03-04-2016
Output for 5.6.15
04-04-2016
Output for 5.6.13
22-04-2016
Output for 5.6.12
26-04-2016
Output for 5.6.11
30-04-2016
Output for 5.6.10
02-05-2016
Output for 5.6.9
04-05-2016
Output for 5.6.8
06-05-2016
Output for 5.5.35
29-05-2016
Output for 5.5.34
17-04-2016
Output for 5.5.33
15-03-2016
Output for 5.5.32
23-03-2016
Output for 5.5.31
27-03-2016
Output for 5.5.30
07-04-2016
Output for 5.5.29
23-04-2016
Output for 5.5.28
27-04-2016
Output for 5.5.27
28-04-2016
Output for 5.5.26
03-05-2016
Output for 5.5.25
05-05-2016
Output for 5.5.24
31-05-2016
Output for 5.4.45
25-09-2015
Output for 5.4.39 - 5.4.44
29-08-2015
Output for 5.4.34 - 5.4.38
22-03-2015
Output for 5.2.0 - 5.2.17
Fatal error: Class 'DateInterval' not found in /in/88Mhn on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/88Mhn on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/88Mhn on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/88Mhn on line 2