3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime('12:07 UTC'); $seconds = (int) $date->format('i'); $rounded = round($seconds / 5) * 5; var_dump($date->format('H:i:s')); var_dump($seconds); var_dump($rounded); $date->setTime($date->format('H'), $rounded, $date->format('s')); var_dump($date->format('H:i:s'));
Output for git.master, git.master_jit, rfc.property-hooks
string(8) "12:07:00" int(7) float(5) string(8) "12:05:00"

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