3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $i = 'PT7H'; $d = '2016-07-07 10:20:00'; $dt = new DateTime($d); echo $dt->dateSub(new DateInterval($i))->format('Y-m-d H:i:s');
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught Error: Call to undefined method DateTime::dateSub() in /in/ZNJJg:6 Stack trace: #0 {main} thrown in /in/ZNJJg on line 6
Process exited with code 255.
Output for 5.5.0 - 5.6.23
Fatal error: Call to undefined method DateTime::dateSub() in /in/ZNJJg on line 6
Process exited with code 255.