|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #74054 New DateInterval properties based on `DateInterval::__debuginfo`
Submitted: 2017-02-07 08:24 UTC Modified: 2022-06-05 14:24 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: derick (profile)
Status: Closed Package: Date/time related
PHP Version: Next Major Version OS: irrelevant
Private report: No CVE-ID: None
 [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.
 [2022-06-05 14:22 UTC]
Automatic comment on behalf of derickr
Log: Fixed bug #74054: New DateInterval properties based on
 [2022-06-05 14:22 UTC]
-Status: Open +Status: Closed
 [2022-06-05 14:24 UTC]
-Type: Feature/Change Request +Type: Documentation Problem -Assigned To: +Assigned To: derick
 [2022-06-05 14:24 UTC]
The fix for this bug has been committed.
If you are still experiencing this bug, try to check out latest source from and re-test.
Thank you for the report, and for helping us make PHP better.

PHP 8.2 handles this now in a much saner way, and henceforth I changed this back into a Documentation bug, which I can also close as the documentation for this change has now been merged into the documentation's sources.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 12 22:01:29 2024 UTC