3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = "2014-11-29"; $today = date('Y-m-d'); $diff = abs(strtotime($date) - strtotime($today)); $years = floor($diff / (365*60*60*24)); $months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24)); $days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); echo $days;
based on bvm0l
Output for 4.3.0 - 7.1.0
4