3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d1 = new \DateTime('2017-07-05T01:00:00+02:00'); $d2 = new \DateTime('2017-07-04T20:00:00-02:00'); var_dump($d1); var_dump($d2); var_dump($diff = $d1->diff($d2)); var_dump($diff->format('%a'));