这只发生在31日到目前为止
echo date('F',strtotime('this month')); //May
echo date('F',strtotime('next month'));//July
echo date('F',strtotime('+1 month'));//July
Run Code Online (Sandbox Code Playgroud)
据我所知,六月是五月之后.但是我猜想从现在开始增加31天后,php就变得懒惰了,整整一个月都没有了.
无论长度如何,我怎样才能安全地获得下个月?理想情况下使用strttotime
编辑忘了提,为什么我希望使用strtotime是我使用搜索框来查找解释用户输入strtotime的事件