3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function diffInDays($date1,$date2) { return $diff = $date1-$date2; return floor($diff/(60*60*24)); } echo diffInDays(date('2014-05-30'),date());
Output for 7.1.0
Warning: date() expects at least 1 parameter, 0 given in /in/mVk3h on line 8 Notice: A non well formed numeric value encountered in /in/mVk3h on line 4 2014
Output for 5.1.0 - 7.0.14
Warning: date() expects at least 1 parameter, 0 given in /in/mVk3h on line 8 2014
Output for 4.3.0 - 5.0.5
Warning: Wrong parameter count for date() in /in/mVk3h on line 8 2014