3v4l.org

run code in 300+ PHP versions simultaneously
<?php function time_offset($timezone = null) { if ($timezone <> null) { $offset = false; try { $time = @new DateTime(); @$time->setTimezone(new DateTimeZone($timezone)); $offset = @$time->getOffset(); } catch (Exception $e) { } $output = is_numeric($offset) ? $offset : false; } else { $output = strtotime(date("Y-m-d H:i:s")) - strtotime(gmdate("Y-m-d H:i:s")); } return $output; } var_dump(time_offset());
Output for git.master, git.master_jit, rfc.property-hooks
int(3600)

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