3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt = new \DateTime('2018-04-01 03:10:00', new \DateTimeZone('Pacific/Auckland')); $dt2 = clone $dt; $dt2->sub(new \DateInterval('PT2H')); var_dump($dt > $dt2, $dt->format(\DateTime::RFC3339), $dt2->format(\DateTime::RFC3339), $dt->diff($dt2)->format('%h'));
Output for git.master, git.master_jit
bool(true) string(25) "2018-04-01T03:10:00+12:00" string(25) "2018-04-01T02:10:00+13:00" string(1) "1"
Output for rfc.property-hooks
bool(true) string(25) "2018-04-01T03:10:00+12:00" string(25) "2018-04-01T02:10:00+13:00" string(1) "2"

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