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:
43.28 ms | 1619 KiB | 5 Q