3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nowDate = new \DateTime('2015-12-21 20:00:00'); $pickupDate = new \DateTime('2015-12-22'); $diff = $nowDate->diff($pickupDate); $daysUntilPickup = $diff ? $diff->days : 0; var_dump($diff);

preferences:
105.33 ms | 402 KiB | 5 Q