3v4l.org

run code in 300+ PHP versions simultaneously
<?php function roundTime($time, $interval){ $seconds = $time; $rounded_seconds = round($seconds / ($interval * 60)) * ($interval * 60); return date('H:i', $rounded_seconds) . "\n"; } echo roundTime(strtotime("2023-05-30 14:40"), 15); echo PHP_EOL; echo roundTime(strtotime("2023-05-30 14:40"), 30);
Output for git.master_jit, git.master, rfc.property-hooks
14:45 14:30

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.09 ms | 981 KiB | 4 Q