3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timezones = [ 'Pacific/Auckland', 'Australia/Canberra', 'Asia/Mumbai', 'Asia/Istanbul', 'Europe/Paris', 'Europe/London', 'America/Sao_Paulo', 'America/New_York', 'America/Los_Angeles' ]; $date = new DateTime('2015-11-05 03:59:59 UTC'); foreach ($timezones as $timezone) { $date->setTimezone(new DateTimeZone($timezone)); echo sprintf('%-20s%s', $timezone.':', $date->format('Y-m-d H:i:s'))."\n"; }
Output for git.master, git.master_jit
Pacific/Auckland: 2015-11-05 16:59:59 Australia/Canberra: 2015-11-05 14:59:59 Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (Asia/Mumbai) in /in/Nbj4I:16 Stack trace: #0 /in/Nbj4I(16): DateTimeZone->__construct('Asia/Mumbai') #1 {main} thrown in /in/Nbj4I on line 16
Process exited with code 255.
Output for rfc.property-hooks
Pacific/Auckland: 2015-11-05 16:59:59 Australia/Canberra: 2015-11-05 14:59:59 Fatal error: Uncaught DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (Asia/Mumbai) in /in/Nbj4I:16 Stack trace: #0 /in/Nbj4I(16): DateTimeZone->__construct('Asia/Mumbai') #1 {main} thrown in /in/Nbj4I on line 16
Process exited with code 255.

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