3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $today = new DateTime('today'); $xmas = new DateTime('24 december last year'); $diff = $today->diff($xmas); echo (int)$diff->format('%a');
based on 7LNjf
Output for 5.3.19 - 5.6.38, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.3.1
313