3v4l.org

run code in 300+ PHP versions simultaneously
<?php function diff($a, $b) { static $FMT = "Y-m-d H:i:s P (\D\S\T=I)"; printf("%20s: %s -> %s\n", $a->format("e"), $a->format($FMT), $b->format($FMT)); } $havana1 = new DateTime("@1615611600"); $havana1->setTimezone(new DateTimeZone("America/Havana")); $havana2 = (clone $havana1)->add(new DateInterval("P1D")); diff($havana1, $havana2); $tehran1 = new DateTime("@1616272200"); $tehran1->setTimezone(new DateTimeZone("Asia/Tehran")); $tehran2 = (clone $tehran1)->add(new DateInterval("P1D")); diff($tehran1, $tehran2); $la1 = new DateTime("@1615708800"); $la1->setTimezone(new DateTimeZone("America/Los_Angeles")); $la2 = (clone $la1)->add(new DateInterval("P1D")); diff($la1, $la2);
Output for git.master, git.master_jit, rfc.property-hooks
America/Havana: 2021-03-13 00:00:00 -05:00 (DST=0) -> 2021-03-14 01:00:00 -04:00 (DST=1) Asia/Tehran: 2021-03-21 00:00:00 +03:30 (DST=0) -> 2021-03-22 01:00:00 +04:30 (DST=1) America/Los_Angeles: 2021-03-14 00:00:00 -08:00 (DST=0) -> 2021-03-15 00:00:00 -07:00 (DST=1)

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:
143.66 ms | 406 KiB | 5 Q