3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date='2013-10'; var_dump(date('Y-m'),strtotime("$date -1 month")); ?>
Output for 5.2.7 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
string(7) "2013-10" int(1377986400)
Output for 5.2.0 - 5.2.6
string(7) "2013-10" int(1380232800)
Output for 5.1.0 - 5.1.6
string(7) "2013-10" int(1380348780)
Output for 4.3.0 - 5.0.5
string(7) "2013-10" int(1383260400)