3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $datetime = new DateTime(2014-05-27); $datetime->add(new DateInterval('P6M')); echo $datetime->format('Y-m-d');
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.28, 5.6.28, 7.0.14 - 7.1.0
1982-11-27
Output for 7.0.6
1982-11-03
Output for 5.6.14, 7.0.5
1982-10-02
Output for 7.0.4
1982-09-10
Output for 7.0.3
1982-09-18
Output for 7.0.2
1982-09-22
Output for 7.0.1
1982-09-23
Output for 7.0.0
1982-09-26
Output for 5.5.30, hhvm-3.12.0
1982-10-01
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.21
1982-11-02
Output for 5.6.20
1982-10-09
Output for 5.6.19
1982-09-07
Output for 5.6.18
1982-09-14
Output for 5.6.17
1982-09-19
Output for 5.6.16
1982-09-27
Output for 5.6.15
1982-09-28
Output for 5.6.13
1982-10-15
Output for 5.6.12
1982-10-19
Output for 5.6.11
1982-10-23
Output for 5.6.10
1982-10-25
Output for 5.6.9
1982-10-27
Output for 5.6.8
1982-10-29
Output for 5.6.7
1982-11-25
Output for 5.5.35
1982-11-22
Output for 5.5.34
1982-10-10
Output for 5.5.33
1982-09-08
Output for 5.5.32
1982-09-17
Output for 5.5.31
1982-09-20
Output for 5.5.29
1982-10-16
Output for 5.5.28
1982-10-20
Output for 5.5.27
1982-10-22
Output for 5.5.26
1982-10-26
Output for 5.5.25
1982-10-28
Output for 5.5.24
1982-11-23
Output for 5.4.45
1983-03-05
Output for 5.4.39 - 5.4.44
1983-03-04
Output for 5.4.34 - 5.4.38
1982-09-03
Output for 5.3.29, 5.4.29 - 5.4.32
1983-03-12
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::add() in /in/D29Bn on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/D29Bn 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/D29Bn 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/D29Bn on line 2