- var_export: documentation ( source)
<?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');