3v4l.org

run code in 300+ 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 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught Error: Call to undefined function new\DateTimeZone() in /in/YOtDd:4 Stack trace: #0 {main} thrown in /in/YOtDd on line 4
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33
Fatal error: Uncaught Error: Class 'IntlDateFormatter' not found in /in/YOtDd:6 Stack trace: #0 {main} thrown in /in/YOtDd on line 6
Process exited with code 255.
Output for 5.5.17 - 5.5.38, 5.6.0 - 5.6.18, 5.6.20 - 5.6.40, 7.0.0 - 7.0.2, 7.0.5 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
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

preferences:
230.25 ms | 401 KiB | 323 Q