3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $from = new DateTime(date('Y-m-d 00:00:00', strtotime("2016-10-19 22:00:00"))); $to = new DateTime(date('Y-m-d 00:00:00', strtotime("today"))); var_dump($to->diff($from)->format('%a'));
based on vRbQL
Output for 5.6.0 - 7.3.0rc4
string(1) "1"