3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $time = strtotime(date('Y-m').'-01'); echo date('Y-m-d',$time); echo '<br>'.$final = date("Y-m-d", strtotime("-1 month", $time));
Output for 4.3.0 - 7.1.0
2013-08-01<br>2013-07-01