|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #74054 New DateInterval properties based on `DateInterval::__debuginfo`
Submitted: 2017-02-07 08:24 UTC Modified: 2020-02-16 22:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: a dot schilder at gmx dot de Assigned:
Status: Open Package: Date/time related
PHP Version: Next Major Version OS: irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: a dot schilder at gmx dot de
New email:
PHP Version: OS:


 [2017-02-07 08:24 UTC] a dot schilder at gmx dot de
The following properties are missing in the documentation (
- 'f' (decimal fraction of second)
- 'weekday' (0 = undefined, 1 to 7 = Monday to Sunday?)
- 'weekday_behavior' (?)
- 'first_last_day_of' (?)
- 'special_type' (?)
- 'special_amount' (?)
- 'have_weekday_relative' (?)
- 'have_special_relative' (?)

Especially the 'f' property is important when comparing two values, and it should be noted that the decimal fraction of the seconds was ignored in previous PHP versions.

Expected result:
Documented properties

Actual result:
Undocumented properties


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-07 12:04 UTC]
-Package: Documentation problem +Package: Date/time related
 [2020-02-16 19:27 UTC]
-Summary: DateInterval property documentation incomplete +Summary: New DateInterval properties based on `DateInterval::__debuginfo` -Type: Documentation Problem +Type: Feature/Change Request -PHP Version: 7.1.1 +PHP Version: Next Major Version
 [2020-02-16 19:27 UTC]
Apart from `f`, all the properties that you mentioned they do not exist:

I don't think this is a Doc Bug, but rather a Feature Request than.
 [2020-02-16 22:19 UTC]
> Apart from `f`, all the properties that you mentioned they do
> not exist […]

That depends on the state of the object.  After it has been
var_dump()ed, for example, the properties do exist, see

I doubt that we want to document these properties, though.
 [2020-02-16 22:22 UTC]
Huh, I thought we had fixed these "properties appear after var_dump" cases... I guess not for the cases where there are both real properties and debug properties.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Aug 04 07:01:24 2021 UTC