3v4l.org

run code in 300+ PHP versions simultaneously
<?php $offset = '+7:00'; // Calculate seconds from offset list($hours, $minutes) = explode(':', $offset); $seconds = $hours * 60 * 60 + $minutes * 60; // Get timezone name from seconds $tz = timezone_name_from_abbr('', $seconds, 1); // Workaround for bug #44780 if($tz === false) $tz = timezone_name_from_abbr('', $seconds, 0); // Set timezone date_default_timezone_set($tz); echo $tz . ': ' . date('r');
Output for git.master, git.master_jit, rfc.property-hooks
Asia/Novosibirsk: Tue, 13 Oct 2015 10:29:58 +0600

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