3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function Number2Date($number) { $seconds = '00'; $minutes = '00'; $hours = '00'; if(strpos($number, '.')) { $arr = explode(".", $number); $hours = $arr[0]; $minutes = 60 * ($arr[1] / 10); } else { $hours = $number; } return $hours.":".$minutes.":".$seconds; } echo Number2Date(48.5); ?>
based on eHnjl
Output for 4.3.0 - 7.2.0
48:30:00