3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($seconds) { $t = round($seconds); //echo round($t/3600); if (round($t/3600) > 0) return sprintf('%02d:%02d:%02d', ($t/3600),($t/60%60), $t%60); return sprintf('%02d:%02d', ($t/60%60), $t%60); } echo foo('290.52262423327'). "\n"; echo foo('9290.52262423327'). "\n"; echo foo(86400+120+6). "\n";
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Implicit conversion from float 4.85 to int loses precision in /in/7PkM2 on line 10 04:51 Deprecated: Implicit conversion from float 154.85 to int loses precision in /in/7PkM2 on line 8 02:34:51 Deprecated: Implicit conversion from float 1442.1 to int loses precision in /in/7PkM2 on line 8 24:02:06

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