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_location_get()

Example

Return the location details for the specified timezone.

<?php
$tz=timezone_open(“Asia/Taipei”);
print_r(timezone_location_get($tz));
?>

Definition and Usage

The timezone_location_get() function returns the location details for the specified timezone.

Syntax

timezone_location_get(object)

Parameter Values

 

Parameter

Description

object

Mandatory. Specifies a DateTimeZone object obtained from timezone_open().

Technical Details

Return Value:

Returns an array containing location details for the timezone.

PHP Version:

5.3+