3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $start = new DateTimeImmutable("2015-09-21 09:00"); $end = new DateTimeImmutable("2015-09-21 17:00"); $diff = $end->diff($start); print_r($diff->setSeconds(15*60));
based on PPNg1
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined method DateInterval::setSeconds() in /in/MgGJm:7 Stack trace: #0 {main} thrown in /in/MgGJm on line 7
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Fatal error: Call to undefined method DateInterval::setSeconds() in /in/MgGJm on line 7
Process exited with code 255.
Output for 5.3.18 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/MgGJm on line 3
Process exited with code 255.