3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = 937.012; $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 git.master, git.master_jit, rfc.property-hooks
float(937.01) Deprecated: Implicit conversion from float 937.01 to int loses precision in /in/ANCni on line 8 string(11) "00:15:37.01" float(937.01) Deprecated: Implicit conversion from float 937.01 to int loses precision in /in/ANCni on line 18 Deprecated: Implicit conversion from float 937.01 to int loses precision in /in/ANCni on line 20 (15 min, 37.00 sec sec)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.63 ms | 402 KiB | 8 Q