-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
Bug report
Accessing the public properties $f, $days and $invert of a class that extends DateInterval throws this error:
Access to private property $f of parent class DateInterval.
However, these properties have always been publicly accessible.
https://www.php.net/manual/en/class.dateinterval.php
Code snippet that reproduces the problem
class NewInterval extends DateInterval
{
}
$i = new NewInterval('P1D');
$i->f = 0.1;
var_dump($i);
Expected output
I don't see any reason this should be considered private.
I am not sure where DateInterval properties are documented. There is a date.stub file, but that was added recently. Are properties defaulted to private or is there an actual mapping that is marking them private?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels