3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new \DateTime('first day of this month'); echo $date1->format('Y-m-d') . "\n"; $date1->setDate(2016, 1, 8); echo $date1->format('Y-m-d') . "\n"; $date2 = new \DateTime('first day of january'); echo $date2->format('Y-m-d') . "\n"; $date2->setDate(2016, 3, 8); echo $date2->format('Y-m-d') . "\n";

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
156.54 ms | 2560 KiB | 10 Q