Req #74054 [Opn]: New DateInterval properties based on `DateInterval::__debuginfo`
| From: | nikic@php.net | Date: | Sun, 16 Feb 2020 22:22:59 +0000 |
| Subject: | Req #74054 [Opn]: New DateInterval properties based on `DateInterval::__debuginfo` | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225601@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74054&edit=1
ID: 74054
Updated by: nikic@php.net
Reported by: a dot schilder at gmx dot de
Summary: New DateInterval properties based on
DateInterval::__debuginfo
Status: Open
Type: Feature/Change Request
Package: Date/time related
Operating System: irrelevant
PHP Version: Next Major Version
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2020-02-16 22:19:55] cmb@php.net
> 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
<https://3v4l.org/Xaov2>.
I doubt that we want to document these properties, though.
------------------------------------------------------------------------
[2020-02-16 19:27:08] carusogabriel@php.net
Apart from f, all the properties that you mentioned they do not exist: https://3v4l.org/2vfiq.
I don't think this is a Doc Bug, but rather a Feature Request than.
------------------------------------------------------------------------
[2017-02-07 08:24:34] a dot schilder at gmx dot de
Description:
------------
The following properties are missing in the documentation (http://www.php.net/class.dateinterval):
- '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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74054&edit=1