3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d1 = new \Datetime('2017-6-1'); $d2 = new \Datetime('2017-7-1'); $diff = $d1->diff($d2); echo $diff->m . " months " . $diff->d . " days\n";
based on UubiJ
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
0 months 30 days