- date_diff: documentation ( source)
- round: documentation ( source)
<?php
$t1 = new DateTime( '2014-09-03 15:00:00' );
$t2 = new DateTime( '2014-09-04 15:00:00' );
echo date_diff( $t1, $t2 )->h;
echo date_diff( $t1, $t2 )->days;
echo round( 26/24, 2);
?>