On Tue, Jan 3, 2023, at 3:48 AM, Philip Hofstetter wrote: > Hi, > > `DateTimeImmutable::modify()` is documented as returning > `DateTimeImmutable`, but it seems to actually be more specifically > returning `static`: > > https://3v4l.org/j9ZSo > > Now I'm wondering whether this is a documentation issue (where it > should return `static|false` and has not been updated to account for > that return type's availability yet) or whether this is a language > issue and the method is supposed to be returning `DateTimeImmutable` > instead, though that's probably a considerable BC break. > > If you agree that it's a doc bug, I'll submit a PR. > > Regards, > > Philip
That sounds like a doc bug to me. It's likely the doc page hasn't been updated since before the `static` return was added. The code looks like it's doing the right thing. Doc PR, please and thank you! --Larry Garfield -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php