3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = date("Y-m-d"); $firstday = date("Y-m-01",strtotime($date)); //取得指定时间所属月的最后一天 $lastday = date("Y-m-d",strtotime("$firstday +1 month -1 day")); echo $lastday ;
based on hPA04
Output for 4.3.0 - 7.1.7
2014-10-31