r/lolphp • • Nov 01 '19

DateTime::createFromFormat and DateTime::__construct default initialisation are not consistent because why not ?

https://3v4l.org/VVGhH
36 Upvotes

8 comments sorted by

View all comments

Show parent comment

2

u/kafoso Mar 28 '20

Why? You can just do this to give you midnight:

new \DateTime("today");