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

Example

Retrieve the name of the timezone.

<?php
$tz=timezone_open(“Europe/Paris”);
echo timezone_name_get($tz);
?>

Definition and Usage

The timezone_name_get() function returns the timezone’s name.

Syntax

timezone_name_get(object)

Parameter Values

 

Parameter

Description

object

Required. Specifies a DateTimeZone object.

Technical Details

Return Value:

Returns a timezone name from the available list of timezones.

PHP Version:

5.2+