3v4l.org

run code in 300+ PHP versions simultaneously
<?php $currentDate = new DateTimeImmutable(); $firstOfTheMonth = new DateTimeImmutable($currentDate->format('Y-m-1')); var_dump($firstOfTheMonth->modify("-1 month"));

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
152.37 ms | 2097 KiB | 11 Q