<?php

$datetime2 = new DateTime("2019-08-13 08:00:00");
$datetime1 = new DateTime("2019-08-13 20:41:23");

$interval = $datetime1->diff($datetime2);

echo $interval->format("%a Days %h Hours %i Minute %s Seconds");

$days_min = $interval->format('%a') * 24 * 60;
$hours_min = $interval->format('%h') * 60;
$min = $interval->format('%i');
$sec = $interval->format('%s') / 60;
echo '<br/>MINUTE : '. ($min + $days_min + $hours_min + $sec);
