3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime('2016-03-30'); $month = DateInterval('P1m'); var_dump(date_sub($date, $month));
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function DateInterval() in /in/fjI0p:3 Stack trace: #0 {main} thrown in /in/fjI0p on line 3
Process exited with code 255.
Output for 5.3.7 - 5.6.28
Fatal error: Call to undefined function DateInterval() in /in/fjI0p on line 3
Process exited with code 255.