3v4l.org

run code in 500+ PHP versions simultaneously
<?php date_default_timezone_set('America/New_York'); $cal = new IntlGregorianCalendar(2022, 2, 13, 1, 59, 59); echo IntlDateFormatter::formatObject($cal), "\n"; $cal->add(IntlCalendar::FIELD_HOUR, 24); echo IntlDateFormatter::formatObject($cal), "\n"; $cal->add(IntlCalendar::FIELD_SECOND, 1); echo IntlDateFormatter::formatObject($cal), "\n";
Output for 8.5.1 - 8.5.11
Fatal error: Uncaught Error: Class "IntlGregorianCalendar" not found in /in/pj5rP:4 Stack trace: #0 {main} thrown in /in/pj5rP on line 4
Process exited with code 255.
Output for 8.4.15 - 8.4.27, 8.5.0
Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in /in/pj5rP on line 4 Mar 13, 2022, 1:59:59 AM Mar 14, 2022, 2:59:59 AM Mar 14, 2022, 3:00:00 AM
Output for 8.4.1 - 8.4.14
Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in /in/pj5rP on line 4 Mar 13, 2022, 1:59:59 AM Mar 14, 2022, 2:59:59 AM Mar 14, 2022, 3:00:00 AM
Output for 8.3.28 - 8.3.35, 8.2.30 - 8.2.34, 8.1.34
Mar 13, 2022, 1:59:59 AM Mar 14, 2022, 2:59:59 AM Mar 14, 2022, 3:00:00 AM
Output for 8.3.0 - 8.3.27, 8.2.0 - 8.2.29, 8.0.1 - 8.0.30, 8.1.0 - 8.1.33, 7.4.0 - 7.4.32
Mar 13, 2022, 1:59:59 AM Mar 14, 2022, 2:59:59 AM Mar 14, 2022, 3:00:00 AM
Output for 7.4.33
Fatal error: Uncaught Error: Class 'IntlGregorianCalendar' not found in /in/pj5rP:4 Stack trace: #0 {main} thrown in /in/pj5rP on line 4
Process exited with code 255.

preferences:
51.54 ms | 1543 KiB | 26 Q