Creating immutable objects in PHP
You may have seen the \DateTimeImmutable class being used, and wondered why is this different from the \DateTime class? I guess it’s the same…but immutable, right? Why would I want to use an immutable object? Here’s a brief overview. ...