3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $posttime = "12:30"; $number = "0.5"; $posttime = explode(":", $posttime); $hoursToNumber = $posttime[0]*60*60; $minutesToNumber = $posttime[1]*60; $number = ($number + $hoursToNumber + $minutesToNumber)/60/60; echo $number;
based on VcAeU
Output for 4.3.0 - 7.2.0
12.500138888889