3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //round pour le changement d'heure $debut = mktime(0, 0, 0, 10, 26, 2013); $fin = mktime(12, 0, 0, 10, 27, 2013); $d1 = new DateTime ('now',new DateTimeZone('Europe/Paris')); $d2 = new DateTime ('now',new DateTimeZone('Europe/Paris')); $d1->setTimestamp($debut); $d2->setTimestamp($fin); $diff = $d1->diff($d2); print_r($diff);