3v4l.org

run code in 300+ PHP versions simultaneously
<?php $the_date = strtotime('31.10.2013'); echo date('r', strtotime('first day of last month', $the_date));

preferences:
43.03 ms | 402 KiB | 5 Q