have the following code where I get the difference between two hours, but in this case the difference is negative
$min_date = '18:40:00';
$hora_termino = '16:30:00';
$dif_min = new DateTime($hora_termino);
$dif_max = new DateTime($time_min);
$result = $dif_min->diff($dif_max);
$result_end = $result->h + $result->i / 60;
echo $result_end /* 2.16*/
This result should be -2.16
. Some form that diff that shows results negatively.