3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo date('Y-m-d', strtotime('March, 26 2014 00:00:00+0000'))."\n"; $dateTime1 = new DateTime(date('Y-m-d', strtotime('March, 26 2014 00:00:00+0000'))); $dateTime2 = new DateTime(date('Y-m-d', strtotime('March, 05 2014 00:00:00+0000'))); $difference = $dateTime1->diff($dateTime2); echo (int)$difference->format('%a');

preferences:
37.32 ms | 402 KiB | 5 Q