//get Date diff as intervals
$d1 = new DateTime("2018-01-10 00:00:00");
$d2 = new DateTime("2019-05-18 01:23:45");
$interval = $d1->diff($d2);
$diffInSeconds = $interval->s; //45
$diffInMinutes = $interval->i; //23
$diffInHours = $interval->h; //8
$diffInDays = $interval->d; //21
$diffInMonths = $interval->m; //4
$diffInYears = $interval->y; //1