Why this doesn't work :
$start = new DateTime('2018-03-11 22:05:43');
$end = new DateTime('2018-03-11 23:15:23');
$interval = $end->diff($start);
echo $interval;
I want to get the difference between two dates and I think it better to use DateTime
than strtotime
.
Thanks.