3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = date_create("12:45:00"); $date2 = date_create("11:00:00"); $diff=date_diff($date1,$date2); echo "Difference in Hours\n"; echo $diff->format("%R%H hours")."\n"; echo "Difference in Minutes\n"; echo $diff->format("%R%i minutes");

preferences:
18.75 ms | 406 KiB | 6 Q