- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$start = date('Y-m-d H:m:s');
$end = date('Y-m-d H:m:s', strtotime($start . ' +24 hours'));
$days = date('Y-m-d', $end) - date('Y-m-d', $start);
echo $days . " " . $start . " " . $end;
?>