3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date_teste = date('Y-m-d', strtotime('last day of last month')); var_dump($date_teste); $date_teste = new DateTime('last day of last month'); var_dump($date_teste);

preferences:
38.63 ms | 406 KiB | 5 Q