3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = "2014-09-29"; $today = date('Y-m-d'); $diff = abs(strtotime($date) - strtotime($today)); $days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); echo $days;
based on eZJgr
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: years in /in/9CKWP on line 7 Notice: Undefined variable: months in /in/9CKWP on line 7 3
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: years in /in/9CKWP on line 7 Notice: Undefined variable: months in /in/9CKWP on line 7 3