Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on PHP DateTimeImmutable::modify(). Parent comment
>DateTimeImmutable::modify — Alters the timestamp
As you have said, it creates a copy, it doesn't alter the object.
Compare it to Python documentation, ex. str.capitalize()[1]:
>Return a copy of the string with its first character capitalized and the rest lowercased.
[1]: https://docs.python.org/3/library/stdtypes.html#str.capitali...
There are no comments on this comment yet.
>DateTimeImmutable::modify — Alters the timestamp
As you have said, it creates a copy, it doesn't alter the object.
Compare it to Python documentation, ex. str.capitalize()[1]:
>Return a copy of the string with its first character capitalized and the rest lowercased.
[1]: https://docs.python.org/3/library/stdtypes.html#str.capitali...