3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $datetime1 = new DateTime('2009-10-11'); $datetime2 = new DateTime('2008-9-13'); $interval = $datetime2->diff($datetime1); echo $interval->format('%R%a days');
Output for 5.3.7 - 7.2.0
+393 days