DateTimeZone::listIdentifiers
PHP 5 >= 5.2.0, PHP 7, PHP 8
DateTimeZone::listIdentifiers - Returns a numerically indexed array containing all defined timezone identifiers
Manual
DateTimeZone::listIdentifiers(
[int$timezoneGroup = DateTimeZone::ALL],
[string|null$countryCode = null]
): public static array
[int$timezoneGroup = DateTimeZone::ALL],
[string|null$countryCode = null]
): public static array
Procedural style
arraytimezone_identifiers_list inttimezoneGroupDateTimeZone::ALL stringnullcountryCodenullParameters
- timezoneGroup
-
One of the DateTimeZone class constants (or a combination).
- countryCode
-
A two-letter ISO 3166-1 compatible country code.
Note:
This option is only used when timezoneGroup is set to DateTimeZone::PER_COUNTRY.
Return Values
Returns the array of timezone identifiers.
Changelog
Version | Description |
8.0.0 | Prior to this version, false was returned on failure. |
7.1.0 | countryCode is nullable now. |