3v4l.org

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

preferences:
37.56 ms | 402 KiB | 5 Q