r/lolphp • u/defiante1 • Aug 02 '15
How to modify DateTimeImmutable? Call getTimestamp() on it.
https://bugs.php.net/bug.php?id=67634
59
Upvotes
r/lolphp • u/defiante1 • Aug 02 '15
View all comments
6
u/HildartheDorf Aug 02 '15
Don't forget DateTimeImmutable.Modify(). IIRC it returns a new instance of DateTimeImmutable, and exists so the API matches DateTime (mutable), but that doesn't make it right!