"immutable"

July 2019

Stop using DateTime
Working with date & time in PHP can sometimes be annoying, leading to unexpected bugs in the code: $startedAt = new DateTime('2019-06-30 10:00:00'); $finishedAt = $startedAt->add(new DateInterval('PT3M')); var_dump($startedAt->format('Y-m-d H:i:s')); //2019-06-30 10:03:00 ❌ var_dump($finishedAt->format('Y-m-d H:i:s')); //2019-06-30 10:03:00 ✅ Both $startedAt and $finishedAt are 3 minutes...