3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateLastMonth = date("first day of last month"); $dateCurrentMonth = date("last day of last month"); var_dump($dateLastMonth, $dateCurrentMonth);

preferences:
40.81 ms | 402 KiB | 5 Q