3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dateLastMonth = date("Y-m-d", strtotime("first day of last month")); $dateCurrentMonth = date("Y-m-d", strtotime("last day of last month")); var_dump($dateLastMonth, $dateCurrentMonth);
Output for 5.6.30
string(10) "2017-06-01" string(10) "2017-06-30"