3v4l.org

run code in 300+ PHP versions simultaneously
<?php $seconds = 2434; $h = $seconds / 3600 % 24; $m = $seconds / 60 % 60; $s = $seconds % 60; $hours = '00'; $minutes = '00'; $seconds = '00'; if ($h > 0){ if (strlen(strval($h)) == 1){ $hours = '0'.strval($h); } else {$hours = strval($h);} } if ($m > 0){ if (strlen(strval($m)) == 1){ $minutes = '0'.strval($m); } else {$minutes = strval($m);} } if ($s > 0){ if (strlen(strval($s)) == 1){ $seconds = '0'.strval($s); } else {$seconds = strval($s);} } $time = $hours.":".$minutes.":".$seconds; echo "\$h: ", $h, " \n"; echo "\$m: ", $m, " \n"; echo "\$s: ", $s, " \n"; echo $time;
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Implicit conversion from float 0.6761111111111111 to int loses precision in /in/c98uO on line 3 Deprecated: Implicit conversion from float 40.56666666666667 to int loses precision in /in/c98uO on line 4 $h: 0 $m: 40 $s: 34 00:40:34

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:
43.6 ms | 402 KiB | 8 Q