Curriculum
Course: PHP Basic
Login

Curriculum

PHP Basic

PHP Install

0/1

PHP Casting

0/1

PHP Constants

0/1

PHP Magic Constants

0/1

PHP Operators

0/1

PHP Reference

0/276
Text lesson

timezone_identifiers_list()

Example

Display all timezones in the Africa region.

<?php
print_r(timezone_identifiers_list(1));
?>

Definition and Usage

The timezone_identifiers_list() function returns an indexed array with all timezone identifiers.

Syntax

timezone_identifiers_list(what, country)

Parameter Values

 

Parameter

Description

what

Optional. Specifies a constant from the DateTimeZone class:

  • 1 = AFRICA
  • 2 = AMERICA
  • 4 = ANTARCTICA
  • 8 = ARCTIC
  • 16 = ASIA
  • 32 = ATLANTIC
  • 64 = AUSTRALIA
  • 128 = EUROPE
  • 256 = INDIAN
  • 512 = PACIFIC
  • 1024 = UTC
  • 2047 = ALL
  • 4095 = ALL_WITH_BC
  • 4096 = PER_COUNTRY

country

Optional. Specifies a two-letter ISO 3166-1 country code.

Technical Details

Return Value:

Returns an indexed array on success or FALSE on failure.

PHP Version:

5.2+

PHP Changelog:

PHP 5.3: The optional what and country parameters were introduced.