3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $datetime1 = DateTime::createFromFormat('Ymd', '20160104');//->format('Y-m-d'); $datetime2 = DateTime::createFromFormat('Ymd', '20170104');//->format('Y-m-d'); echo "<pre>"; echo $datetime1->diff($datetime2)->format('%R%M');
based on qrsNg
Output for 5.3.20 - 7.2.0
<pre>+00