PHP timezone_location_get() Function

12 Jan 2025 | 1 min read

The PHP timezone_location_get() function is used to show the information of the location of the given timezone.

Syntax

Parameters

Object: It specifies a DateTimeZone object.

Return

Returns array on success or FALSE on failure.

Example 1

Output:

 Array ( [country_code] => TW [latitude] => 25.05 [longitude] => 121.5 [comments] => ) 

Example 2

Output:

 Array ( [country_code] => HR [latitude] => 45.8 [longitude] => 15.96666 [comments] => ) 

Example 3

Output:

 Array ( [country_code] => FR [latitude] => 48.86666 [longitude] => 2.33333 [comments] => )