3v4l.org

run code in 300+ PHP versions simultaneously
<?php function timezoneExhibitsDST($tzId) { $tz = new DateTimeZone($tzId); $date = new DateTime("now",$tz); var_dump($date); $trans = $tz->getTransitions(); foreach ($trans as $k => $t) if ($t["ts"] > $date->format('U')) { print_r($t); return $trans[$k-1]['isdst']; } } var_dump(timezoneExhibitsDST("Europe/London"));
Output for git.master
object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-12 04:03:19.003952" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/London" } Array ( [ts] => 1509238800 [time] => 2017-10-29T01:00:00+00:00 [offset] => 0 [isdst] => [abbr] => GMT ) bool(true)
Output for git.master_jit
object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-12 04:03:19.004039" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/London" } Array ( [ts] => 1509238800 [time] => 2017-10-29T01:00:00+00:00 [offset] => 0 [isdst] => [abbr] => GMT ) bool(true)
Output for rfc.property-hooks
object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-12 04:03:19.004282" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/London" } Array ( [ts] => 1509238800 [time] => 2017-10-29T01:00:00+00:00 [offset] => 0 [isdst] => [abbr] => GMT ) bool(true)

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