3v4l.org

run code in 300+ PHP versions simultaneously
<?php $formatter = new \IntlDateFormatter('it', 2, -1, "Europe/Rome", 1, "dd/MM/yyyy"); $formatter->setLenient(false); echo 'Pattern 1: dd/MM/yyyy'; echo "\n"; echo "27/05/1978: "; echo $formatter->parse('27/05/1978'); echo "\n"; echo "28/05/1978: "; echo $formatter->parse('28/05/1978'); echo "ERROR: "; echo intl_get_error_message(); echo "\n"; echo "29/05/1978: "; echo $formatter->parse('29/05/1978'); echo "\n\n"; echo 'Pattern 2: yyyy-MM-dd (Symfony\'s default)'; $formatter = new \IntlDateFormatter('it', 2, -1, "Europe/Rome", 1, "yyyy-MM-dd"); $formatter->setLenient(false); echo "\n"; echo "28/05/1978: "; echo $formatter->parse('1978-05-28'); echo "ERROR: "; echo intl_get_error_message();
Output for git.master, git.master_jit, rfc.property-hooks
Pattern 1: dd/MM/yyyy 27/05/1978: 265071600 28/05/1978: ERROR: Date parsing failed: U_PARSE_ERROR 29/05/1978: 265240800 Pattern 2: yyyy-MM-dd (Symfony's default) 28/05/1978: ERROR: 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:
56.38 ms | 401 KiB | 8 Q