3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fromDate="2013-03-03"; $toDate="2013-03-05"; $fromDate = strtotime($fromDate); $toDate = strtotime($toDate); $diffDate = abs($toDate - $fromDate); echo $diffDateLast = round($diffDate / (60 * 60 * 24)); echo ">>>>>>>>".date("Y-m-d H:i:s"); echo ">>>>>>>>".date("Y-m-d",strtotime($toDate." +1 day"));

preferences:
39.48 ms | 402 KiB | 5 Q