Trying to understand the DateTime class, but am having problems figuring out how to return the date for the first day of a future month relative to now.
Essentially, I want to return (for example), the first day of next August. If I use:
new DateTime( date('Y-m-d', strtotime('first day of August') ) )
it returns 2017-08-01, which has already passed. I wanted to return 2018-08-01. Using "first day of next August" doesn't work. Is there a way to accomplish what I want using the strtotime parser?