3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new DateTime('14:25'); $b = new DateTime('17:30'); $interval1 = $a->diff($b); echo "interval 1: ", $interval1->format("%H:%I"), "\n"; $c = new DateTime('08:00'); $d = new DateTime('13:00'); $interval2 = $c->diff($d); echo "interval 2: ", $interval2->format("%H:%I"), "\n"; $e = new DateTime('00:00'); $f = clone $e; $e->add($interval1); $e->add($interval2); echo "Total interval : ", $f->diff($e)->format("%H:%I"), "\n";
Output for git.master_jit, git.master, rfc.property-hooks
interval 1: 03:05 interval 2: 05:00 Total interval : 08:05

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:
108.03 ms | 405 KiB | 5 Q