3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new \DateTime('-1 day'); $date2 = new \DateTime(); $minutes = ($date2->getTimestamp() - $date1->getTimestamp())/60; var_dump($minutes);

preferences:
34.86 ms | 404 KiB | 5 Q