<?php

$start=date_create("2016-05-16 23:04:08");
$end=date_create("2016-05-17 8:23:14");
$diff=date_diff($start,$end);
echo $diff->format("%H:%I:%S");
echo "\n";

$diff_s = $end->getTimestamp() - $start->getTimestamp();
$diff_h = $diff_s/3600;
echo round($diff_h, 2);