3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function decimal_to_time($decimal) { $hours = floor($decimal / 60); $minutes = floor($decimal % 60); $seconds = $decimal - (int)$decimal; $seconds = round($seconds * 60); return str_pad($hours, 2, "0", STR_PAD_LEFT) . ":" . str_pad($minutes, 2, "0", STR_PAD_LEFT) . ":" . str_pad($seconds, 2, "0", STR_PAD_LEFT); } echo decimal_to_time(1103);
based on XG8tF
Output for 5.3.20 - 7.1.20
18:23:00