3v4l.org

run code in 500+ PHP versions simultaneously
<?php $actual='34:50'; $expected='22:00'; list($hrs, $min) = explode(':', $actual); $total1 = $min + $hrs * 60; list($hrs, $min) = explode(':', $expected); $diff = $min + $hrs * 60 - $total1; $start_time = new DateTime(); $expected_time = new DateTime(); $expected_time->modify(($diff < 0 ? '' : '+') . "$diff minutes"); $time = $start_time->diff($expected_time); echo $time->format('%hh %Im');
Output for git.master, git.master_jit, rfc.property-hooks
12h 49m

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:
43.1 ms | 1917 KiB | 4 Q