3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateTimeZoneTaipei = new DateTimeZone("Asia/Taipei"); $dateTimeZoneJapan = new DateTimeZone("Asia/Tokyo"); // Create two DateTime objects that will contain the same Unix timestamp, but // have different timezones attached to them. $dateTimeTaipei = new DateTime("now", $dateTimeZoneTaipei); $dateTimeJapan = new DateTime("now", $dateTimeZoneJapan); // Calculate the GMT offset for the date/time contained in the $dateTimeTaipei // object, but using the timezone rules as defined for Tokyo // ($dateTimeZoneJapan). $timeOffset = $dateTimeZoneJapan->getOffset($dateTimeTaipei); // Should show int(32400) (for dates after Sat Sep 8 01:00:00 1951 JST). var_dump($timeOffset);
Output for git.master, git.master_jit, rfc.property-hooks
int(32400)

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