3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date1 = "2007-03-24"; $date2 = "2009-06-26"; $diff = abs(strtotime($date2) - strtotime($date1)); $days = floor($diff / 60*60*24); printf("%d days\n", $days);
Output for 4.3.0, 5.1.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
1710633600 days
Output for 4.3.1 - 5.0.5
1710720000 days