3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $timezones = [ 'Pacific/Auckland', 'Australia/Canberra', 'Asia/Calcutta', '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('%-23s%s', $timezone.':', $date->format('Y-m-d H:i:s'))."\n"; }
based on HMHZv
Output for 5.6.15 - 7.2.0
Pacific/Auckland: 2015-11-05 16:59:59 Australia/Canberra: 2015-11-05 14:59:59 Asia/Calcutta: 2015-11-05 09:29:59 Asia/Istanbul: 2015-11-05 06:59:59 Europe/Paris: 2015-11-05 04:59:59 Europe/London: 2015-11-05 03:59:59 America/Sao_Paulo: 2015-11-05 01:59:59 America/New_York: 2015-11-04 22:59:59 America/Los_Angeles: 2015-11-04 19:59:59
Output for 5.4.0 - 5.6.14
Pacific/Auckland: 2015-11-05 16:59:59 Australia/Canberra: 2015-11-05 14:59:59 Asia/Calcutta: 2015-11-05 09:29:59 Asia/Istanbul: 2015-11-05 05:59:59 Europe/Paris: 2015-11-05 04:59:59 Europe/London: 2015-11-05 03:59:59 America/Sao_Paulo: 2015-11-05 01:59:59 America/New_York: 2015-11-04 22:59:59 America/Los_Angeles: 2015-11-04 19:59:59
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/2oSrK on line 2
Process exited with code 255.