3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(string $timezone) { $ok = true; try { new DateTimeZone($timezone); } catch (Exception $e) { $ok = false; } echo "$timezone: ", var_export($ok, true), "\n"; } test('+01:00'); test('+01:00:00');
Output for 8.0.10 - 8.0.12, 8.1rc1 - rc3
+01:00: true +01:00:00: false
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.25, 8.0.0 - 8.0.9
+01:00: true +01:00:00: true

preferences:
28.8 ms | 461 KiB | 5 Q