php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #53383 timezone_name_get() documentation says 0 parameters, actually takes 1.
Submitted: 2010-11-23 04:31 UTC Modified: 2010-11-23 04:59 UTC
From: tonyv at cohtitan dot com Assigned: frozenfire (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tonyv at cohtitan dot com
New email:
PHP Version: OS:

 

 [2010-11-23 04:31 UTC] tonyv at cohtitan dot com
Description:
------------
---
From manual page: http://www.php.net/datetimezone.getname#Parameters
---

The documentation for timezone_name_get() says that the function takes no 
parameters.  The object oriented version doesn't, but the procedural version takes 
exactly one DateTimeZone parameter.

Test script:
---------------
// Documentation of function indicates following prototype:
// string timezone_name_get ( void )

$tz_name = timezone_name_get();
// Generates warning:
// PHP Warning:  timezone_name_get() expects exactly 1 parameter, 0 given

$tz_obj = new DateTimeZone("America/New_York");
$tz_name = timezone_name_get($tz_obj);
// $tz_name is correctly set to "America/New_York";


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-23 04:59 UTC] frozenfire@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: frozenfire
 [2010-11-23 04:59 UTC] frozenfire@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 29 08:00:01 2026 UTC