3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = "2014-11-29"; $today = date('Y-m-d'); echo $today; $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 Pt6K8
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2014-09-264