php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49745 Inconsistent type for interval
Submitted: 2009-10-02 09:11 UTC Modified: 2009-10-02 20:20 UTC
From: edwin dot h at clear dot net dot nz Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.3.0 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: edwin dot h at clear dot net dot nz
New email:
PHP Version: OS:

 

 [2009-10-02 09:11 UTC] edwin dot h at clear dot net dot nz
Description:
------------
In the Description section of the documentation, for DateTime::add() the 
variable type for $interval is said to be "string", but for the 
procedural equivalent, date_add() the variable type for $interval is 
said to be "DateInterval".

However, in the Parameters section of the documentation, the type for 
$interval is only said to be "DateTime" and there is no mention of 
"string".

This is inconsistent - though I am not clear whether the Description 
section is correct and the Parameters section is wrong, or vice versa.

Reproduce code:
---------------
---
From manual page: datetime.add#Description
---


Expected result:
----------------
Not applicable.

Actual result:
--------------
Not applicable.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-02 20:20 UTC] svn@php.net
Automatic comment from SVN on behalf of fa
Revision: http://svn.php.net/viewvc/?view=revision&revision=289096
Log: fix #49745 - "string" -> "DateInterval" in method description
 [2009-10-02 20:20 UTC] fa@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.


 [2020-02-07 06:10 UTC] phpdocbot@php.net
Automatic comment on behalf of fa
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=82f589e14706f01d8eaf7bc21dd069c0ba8bc148
Log: fix #49745 - "string" -> "DateInterval" in method description
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 12:00:01 2026 UTC