3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tz=new DateTimeZone('Europe/Moscow'); $d1=new DateTime('2014-10-26T00:59:59', $tz); $d2=new DateTime('2014-10-26T01:59:59', $tz); var_dump($d2->diff($d1, true)->h); var_dump($d1->add($int=new DateInterval('PT2H'))->format(DateTime::ISO8601), $d2->sub($int)->format(DateTime::ISO8601));
Output for git.master, git.master_jit, rfc.property-hooks
int(1) string(24) "2014-10-26T01:59:59+0300" string(24) "2014-10-26T00:59:59+0400"

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