PHP Tutorial - PHP timezone_location_get() Function






Definition

The timezone_location_get() returns location information for the given timezone.

Syntax

PHP timezone_location_get() Function has the following syntax.

timezone_location_get(object);

Parameter

PHP timezone_location_get() Function has the following parameters.

object - Required. DateTimeZone object returned by timezone_open()

Return

PHP timezone_location_get() Function returns an array that contains location information for the timezone.

Example

Return location information for the given timezone:


<?php
$tz=timezone_open("Asia/Taipei");
echo timezone_location_get($tz);
?>

The code above generates the following result.