3v4l.org

run code in 300+ PHP versions simultaneously
<?php function seconds_from_time($time) { list($h, $m, $s) = explode(':', $time); return ($h * 3600) + ($m * 60) + $s; } function time_from_seconds($seconds) { $h = floor($seconds / 3600); $m = floor(($seconds % 3600) / 60); $s = $seconds - ($h * 3600) - ($m * 60); return sprintf('%02d:%02d:%02d', $h, $m, $s); } echo seconds_from_time("18:27:31"); echo '<br />'; echo time_from_seconds(66451); ?>
Output for git.master, git.master_jit, rfc.property-hooks
66451<br />18:27:31

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:
42.22 ms | 401 KiB | 8 Q