3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); $utc = new DateTimeZone('UTC'); $time = DateTime::createFromFormat('Y-m-d H:i:s', '2014-05-19 11:30:00', $utc); foreach (array('UTC', 'Europe/London', 'BST', 'Etc/GMT+1', 'GMT+1', 'CEST', 'EST', 'GMT-5') as $abbr) { $local = clone $time; try { $zone = new DateTimeZone($abbr); $local->setTimezone(new DateTimeZone($abbr)); echo "{$abbr}: {$zone->getOffset($time)} {$local->format(DATE_RFC822)}", PHP_EOL; } catch (Exception $e) { echo "{$abbr}: ERROR - {$e->getMessage()}", PHP_EOL; } }
Output for git.master, git.master_jit, rfc.property-hooks
UTC: 0 Mon, 19 May 14 11:30:00 +0000 Europe/London: 3600 Mon, 19 May 14 12:30:00 +0100 BST: 3600 Mon, 19 May 14 12:30:00 +0100 Etc/GMT+1: -3600 Mon, 19 May 14 10:30:00 -0100 GMT+1: 3600 Mon, 19 May 14 12:30:00 +0100 CEST: 7200 Mon, 19 May 14 13:30:00 +0200 EST: -18000 Mon, 19 May 14 06:30:00 -0500 GMT-5: -18000 Mon, 19 May 14 06:30:00 -0500

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