3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Paris'); echo date('Y-m-d', strtotime(date('Y-m-01').' -1 MONTH'));

preferences:
43.27 ms | 402 KiB | 5 Q