3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $datetime = new DateTime(); $datetime->modify('+6 months'); echo $datetime->format('Y-m-d');
Output for 5.6.28, 7.0.14 - 7.1.0
2015-09-26
Output for 7.0.6
2016-11-21
Output for 7.0.5
2016-10-02
Output for 7.0.4
2016-09-09
Output for 7.0.3
2016-09-17
Output for 7.0.2
2016-09-21
Output for 7.0.1
2016-09-23
Output for 7.0.0
2016-09-26
Output for hhvm-3.12.0
2016-09-11
Output for hhvm-3.10.0
2016-09-29
Output for 5.6.21
2016-11-02
Output for 5.6.20
2016-10-09
Output for 5.6.19
2016-09-06
Output for 5.6.18
2016-09-14
Output for 5.6.17
2016-09-19
Output for 5.6.16
2016-09-27
Output for 5.6.15
2016-09-28
Output for 5.5.30, 5.6.14
2016-10-01
Output for 5.6.13
2016-10-14
Output for 5.6.12
2016-10-19
Output for 5.6.11
2016-10-22
Output for 5.6.10
2016-10-24
Output for 5.6.9
2016-10-27
Output for 5.6.8
2016-10-30
Output for 5.5.35
2016-11-23
Output for 5.5.34
2016-10-10
Output for 5.5.33
2016-09-08
Output for 5.5.32
2016-09-15
Output for 5.5.31
2016-09-20
Output for 5.5.29
2016-10-16
Output for 5.5.28
2016-10-20
Output for 5.5.27
2016-10-21
Output for 5.5.26
2016-10-25
Output for 5.5.25
2016-10-28
Output for 5.5.24
2016-11-24
Output for 5.2.0 - 5.4.45
2016-05-09
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/BoPdG 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/BoPdG 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/BoPdG on line 2