3v4l.org

run code in 200+ php & hhvm versions
<?php $begin = new DateTime('1900-01-01'); $end = new DateTime('2100-01-01'); $interval = DateInterval::createFromDateString('1 day'); $period = new DatePeriod($begin, $interval, $end); $intlDateFormatter = new IntlDateFormatter("en_US", IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE, "Europe/Malta", 1, "dd/MM/yyyy"); $intlDateFormatter->setLenient(false); foreach ($period as $dt) { $formattedDate = $dt->format("d/m/Y"); $timestamp = $intlDateFormatter->parse($formattedDate); if (intl_get_error_code() != 0) { echo $formattedDate."\n"; echo intl_get_error_message()."\n"; } }
based on CqXkW
Output for 5.6.0 - 7.3.1
03/06/1916 Date parsing failed: U_PARSE_ERROR 01/04/1917 Date parsing failed: U_PARSE_ERROR 10/03/1918 Date parsing failed: U_PARSE_ERROR 02/03/1919 Date parsing failed: U_PARSE_ERROR 21/03/1920 Date parsing failed: U_PARSE_ERROR 15/06/1940 Date parsing failed: U_PARSE_ERROR 16/03/1947 Date parsing failed: U_PARSE_ERROR 22/05/1966 Date parsing failed: U_PARSE_ERROR 28/05/1967 Date parsing failed: U_PARSE_ERROR 26/05/1968 Date parsing failed: U_PARSE_ERROR 01/06/1969 Date parsing failed: U_PARSE_ERROR 31/05/1970 Date parsing failed: U_PARSE_ERROR 23/05/1971 Date parsing failed: U_PARSE_ERROR 28/05/1972 Date parsing failed: U_PARSE_ERROR 31/03/1973 Date parsing failed: U_PARSE_ERROR 21/04/1974 Date parsing failed: U_PARSE_ERROR