3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo date('Y-m-d 00:00:00', strtotime('first day of last month')). PHP_EOL; echo date('Y-m-d 23:59:59', strtotime('last day of last month')) . PHP_EOL; echo date('Y-m-d 00:00:00', strtotime('first day of this month')). PHP_EOL; echo date('Y-m-d 23:59:59', strtotime('last day of this month')) . PHP_EOL;

preferences:
54.59 ms | 402 KiB | 5 Q