3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new \DateTime('2016-03-01'); $date2 = new \DateTime('2016-03-31'); $diff = date_diff($date1, $date2, true); var_dump($diff); // see ["f"]=>float(0)

preferences:
34.28 ms | 405 KiB | 5 Q