3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $time = 935.2832234; $time = round($time, 2); var_dump($time); var_dump(gmdate('H:i:s', $time)); var_dump($time); $timeOut = ''; if ($time > 60 * 60) { $timeOut .= gmdate('H', $time) . ' hours, '; } if ($time > 60) { $timeOut .= gmdate('i', $time) . ' min, '; } $timeOut .= number_format(($time % 60), 2) . ' sec'; echo ' (' . $timeOut . ' sec)' . "\n\n";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
float(935.28) string(8) "00:15:35" float(935.28) (15 min, 35.00 sec sec)