- abs: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$startTimeStamp = strtotime("1971/01/01");
$endTimeStamp = date("Y/m/d");
echo $timeDiff = abs($endTimeStamp - $startTimeStamp);
$numberDays = $timeDiff/86400; // 86400 seconds in one day
// and you might want to convert to integer
echo $numberDays = intval($numberDays);
?>