3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Tue, 10 Apr 2012 11:27:56 +0300"; $d1 = new DateTime($str); $d2 = new DateTime; $d2->modify($str); $t1 = $d1->getTimestamp(); $t2 = $d2->getTimestamp(); $tz1 = $d1->getTimezone()->getName(); $tz2 = $d2->getTimezone()->getName(); $f1 = $d1->format(DateTime::RFC2822); $f2 = $d2->format(DateTime::RFC2822); var_dump(compact('t1', 't2', 'tz1', 'tz2', 'f1', 'f2'));
Output for git.master, git.master_jit, rfc.property-hooks
array(6) { ["t1"]=> int(1334046476) ["t2"]=> int(1334050076) ["tz1"]=> string(6) "+03:00" ["tz2"]=> string(16) "Europe/Amsterdam" ["f1"]=> string(31) "Tue, 10 Apr 2012 11:27:56 +0300" ["f2"]=> string(31) "Tue, 10 Apr 2012 11:27:56 +0200" }

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:
37.38 ms | 402 KiB | 8 Q