3v4l.org

run code in 300+ PHP versions simultaneously
<?php $seconds = 2; $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); } } if ($m > 0){ if (strlen(strval($m)) == 1){ $minutes = '0'.strval($m); } } if ($s > 0){ if (strlen(strval($s)) == 1){ $seconds = '0'.strval($s); } } $time = $hour.$minute.$second; echo $time;
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Implicit conversion from float 0.0005555555555555556 to int loses precision in /in/pgd7d on line 3 Deprecated: Implicit conversion from float 0.03333333333333333 to int loses precision in /in/pgd7d on line 4 Warning: Undefined variable $hour in /in/pgd7d on line 26 Warning: Undefined variable $minute in /in/pgd7d on line 26 Warning: Undefined variable $second in /in/pgd7d on line 26

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