3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_timezone1(string $timezone) : string { $fmt = new IntlDateFormatter('en_US.utf8'); $res = $fmt->setTimeZone(new DateTimeZone($timezone)); if ($res === false) { var_dump($fmt->getErrorMessage()); } $fmt->setPattern('yyyy-MM-dd HH:mm'); return $fmt->format(time()); } var_dump(test_timezone1('Europe/Kiev')); var_dump(test_timezone1('Europe/Kyiv'));
Output for git.master, git.master_jit, rfc.property-hooks
string(16) "2024-01-15 18:44" string(126) "datefmt_set_timezone: time zone id 'Europe/Kyiv' extracted from ext/date DateTimeZone not recognized: U_ILLEGAL_ARGUMENT_ERROR" string(16) "2024-01-15 17:44"

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:
33.77 ms | 406 KiB | 5 Q