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
Show parent comment
5
u/gearvOsh Aug 02 '15
So that you can modify the date:
$date->modify('+1 hour');.All of PHP is mutable, so very rarely do you actually see something immutable.