3v4l.org

run code in 500+ PHP versions simultaneously
<?php $goodFormatter = new IntlDateFormatter("ru_RU", IntlDateFormatter::FULL, IntlDateFormatter::FULL, new DateTimeZone("UTC")); $badFormatter = new IntlDateFormatter("ru_RU", IntlDateFormatter::FULL, IntlDateFormatter::FULL, new DateTimeZone("UTC"), null, "d MMM"); $badFormatter2 = new IntlDateFormatter("ru_RU", IntlDateFormatter::FULL, IntlDateFormatter::FULL, new DateTimeZone("UTC")); $badFormatter2->setPattern("d MMM"); echo "Formatter without pattern: " . $goodFormatter->getLocale() . PHP_EOL; echo "Formatter with pattern: " . $badFormatter->getLocale() . PHP_EOL; echo "Formatter with pattern set later: " . $badFormatter2->getLocale() . PHP_EOL;
Output for 8.5.1 - 8.5.13, 8.6.0, 8.0.13
Fatal error: Uncaught Error: Class "IntlDateFormatter" not found in /in/S1CsZ:3 Stack trace: #0 {main} thrown in /in/S1CsZ on line 3
Process exited with code 255.
Output for 8.0.14 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.36, 8.3.0 - 8.3.37, 8.4.1 - 8.4.28, 8.5.0, 8.0.0 - 8.0.12, 7.4.0 - 7.4.32, 7.0.6 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.31
Formatter without pattern: ru Formatter with pattern: ru Formatter with pattern set later: ru
Output for 7.4.33, 7.3.32 - 7.3.33
Fatal error: Uncaught Error: Class 'IntlDateFormatter' not found in /in/S1CsZ:3 Stack trace: #0 {main} thrown in /in/S1CsZ on line 3
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.5
Formatter without pattern: ru Formatter with pattern: Formatter with pattern set later: ru

preferences:
33.24 ms | 1188 KiB | 6 Q