3v4l.org

run code in 200+ PHP versions simultaneously
<?php $now = new \DateTime(); $russian = new\DateTimeZone('Europe/Moscow'); $now->setTimezone($russian); $fmt = new IntlDateFormatter( 'en-US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'Europe/Moscow', IntlDateFormatter::GREGORIAN ); echo $now->format('Y-m-d H:i:s'); echo $fmt->format($now);
Output for 5.5.17 - 5.6.18, 5.6.20 - 7.0.2, 7.0.5 - 7.4.0
2016-05-18 14:41:57Wednesday, May 18, 2016 at 2:41:57 PM Moscow Standard Time
Output for 5.6.19, 7.0.3 - 7.0.4
2016-05-18 14:41:58Wednesday, May 18, 2016 at 2:41:58 PM Moscow Standard Time
Output for 5.5.0 - 5.5.16
2016-05-18 15:41:57Wednesday, May 18, 2016 at 2:41:57 PM Moscow Standard Time