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 forward in time, because methods such as add(), sub() or...

Read more »

datetime immutable value object

Community-driven PHP 8 Wish List

It's been over two months since I started a research on Twitter about the things that developers would like to be added or improved in the next major PHP release: Fellow #PHP developers, what are the features you would like to be added, changed or removed in 8.0?— Nikola Poša (@nikolaposa)...

Read more »

php8 research wish list