3v4l.org

run code in 300+ PHP versions simultaneously
<?php $firstOfTheMonth = new DateTimeImmutable('first day of this month'); var_dump($firstOfTheMonth->modify("-1 month"));

preferences:
32.75 ms | 404 KiB | 5 Q