3v4l.org

run code in 300+ PHP versions simultaneously
<?php $intlDateFormatter = new IntlDateFormatter( 'en_US', IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE, 'Asia/Nicosia', IntlDateFormatter::GREGORIAN, 'yyyy-MM-dd HH' ); $intlDateFormatter->setLenient(false); $date = '1990-03-24 01'; $res = $intlDateFormatter->parse($date); echo "$date - $res\n"; // 1990-03-24 - 638229600 $date = '1990-03-25 01'; //$intlDateFormatter->setLenient(true); $res = $intlDateFormatter->parse($date, $pos); var_dump($res); var_dump($pos); var_dump($intlDateFormatter->getErrorCode()); var_dump($intlDateFormatter->getErrorMessage()); echo "$date - $res\n"; // 1990-03-25 - $date = '1990-03-26 01'; $res = $intlDateFormatter->parse($date); echo "$date - $res\n"; // 1990-03-26 - 638398800
Output for git.master, git.master_jit, rfc.property-hooks
1990-03-24 01 - 638233200 int(638316000) int(13) int(0) string(12) "U_ZERO_ERROR" 1990-03-25 01 - 638316000 1990-03-26 01 - 638402400

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:
44.55 ms | 401 KiB | 8 Q