3v4l.org

run code in 300+ PHP versions simultaneously
<?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"; } }
Output for git.master, git.master_jit, rfc.property-hooks
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

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
74.39 ms | 402 KiB | 8 Q