3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lastDate = new DateTime('2019-03-01'); $firstDate = new DateTime('2019-01-01'); $dateInterval = $lastDate->diff($firstDate); var_dump($dateInterval);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
157.2 ms | 1666 KiB | 11 Q