3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo date(DATE_RFC2822, strtotime('first day of last month midnight')) . "\n"; echo date(DATE_RFC2822, strtotime('first day of this month midnight')) . "\n"; echo date(DATE_RFC2822, strtotime('last day of this month midnight')) . "\n";

preferences:
53.1 ms | 402 KiB | 5 Q