3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = new DateTime('01:01:01.000001'); $timeH = $time->modify('+1 hour'); echo $timeH->format('H:i:s.u') . '<br>'; // prints 02:01:01.000001 $timeM = $time->modify('+1 minute'); echo $timeM->format('H:i:s.u') . '<br>'; // prints 02:02:01.000001 $timeS = $time->modify('+1 second'); echo $timeS->format('H:i:s.u') . '<br>'; // prints 02:02:02.000001 $timeMS = $time->modify('+1 microsecond'); echo $timeMS->format('H:i:S:u') . '<br>'; // error
Output for git.master, git.master_jit, rfc.property-hooks
02:01:01.000001<br>02:02:01.000001<br>02:02:02.000001<br>02:02:th:000002<br>

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