Example 1 — Looking Up an Abbreviation
The returned array is large, so we do not print all of it. Instead we check that it is an array and look for a few well-known abbreviations.
<?php
$abbr = timezone_abbreviations_list();
var_dump(is_array($abbr));
var_dump(isset($abbr['est']));
var_dump(isset($abbr['utc']));
echo gettype($abbr['est']), PHP_EOL; How It Works
- timezone_abbreviations_list() returns the complete list in one array.
- is_array() confirms the return type.
- isset() checks whether a key such as est or utc exists.
- Each abbreviation holds an array of entries, so gettype() prints array.

