3v4l.org

run code in 300+ PHP versions simultaneously
<?php $calcul = (strtotime("today") - strtotime("12-09-2013")); echo strftime("%d-%m-%Y", $calcul) . '<br />'; echo strftime("%d-%m-%Y", strtotime("today")); $date1 = new DateTime("03-24-2007"); $date2 = new DateTime("03-26-2009"); $interval = $date1->diff($date2); echo "difference " . $interval->y . " years, " . $interval->m." months, ".$interval->d." days ";

preferences:
32.12 ms | 402 KiB | 5 Q