Beh, con strtotime puoi ottenere il timestamp delle date, quindi puoi semplicemente sottrarre e ri-convertire in data...
ES:
PS: Non l'ho testato, provalo e facci sapere...codice:function tempotrascorso($d1, $d2) { $t1 = strtotime($d1); $t2 = strtotime($d2); $t_diff = $t2 - $t1; # ed ora gestisci come preferisci il timestamp # es: ore e minuti $h = 0; $m = 0; while ($t_diff > (60 * 60)) { $t_diff -= (60 * 60); $h++; } $m = $t_diff; return array($h, $m); }