I'm trying to show how many hours an employee has worked, but the forms I've tried have incorrect values. They follow the same ones below:
This returns the difference with 3 hours and 2 minutes less:
$horario1 = '16:05:00';
$horario2 = '10:16:53';
date('H:i:s',(strtotime($horario1) - strtotime($horario2))));
And this one returned 21:00:06 for the above exemplified hours:
date('H:i:s',($horario1 - $horario2)));