You can convert them to timestamps and go from there:
$hourdiff = round((strtotime($time1) - strtotime($time2))/3600, 1);
Dividing by 3600 because there are 3600 seconds in one hour and using round()
to avoid having a lot of decimal places.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…