3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $time = 2181914; $time = round($time, 2); var_dump($time); var_dump(gmdate('H:i:s', $time) . substr($time, strpos($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 - 7.1.0
float(2181914) string(15) "06:05:142181914" float(2181914) (06 hours, 05 min, 14.00 sec sec)