3v4l.org

run code in 200+ 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 - 7.2.6
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 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.0.20
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