3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = '07:00'; //started at 7 after midnight $brake = '01:30'; //1 hour and 30 minutes of brake $brakeBits = explode(":", $brake); $finish = '15:00'; //finished at 3 afternoon $startDate = \DateTime::createFromFormat("!H:i", $start); $startDate->modify($brakeBits[0]." hour ".$brakeBits[1]." minutes"); $endDate = \DateTime::createFromFormat("!H:i", $finish); $diff = $startDate->diff($endDate); echo $diff->format("%r%H:%I");
Output for git.master, git.master_jit, rfc.property-hooks
06: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:
27.99 ms | 405 KiB | 5 Q