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(60*60*24); printf("%d years, %d months, %d days\n", $years, $months, $days);
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: years in /in/CVXhj on line 10 Notice: Undefined variable: months in /in/CVXhj on line 10 0 years, 0 months, 86400 days
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: years in /in/CVXhj on line 10 Notice: Undefined variable: months in /in/CVXhj on line 10 0 years, 0 months, 86400 days