3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dt1 = getdate() $dt2 = getdate() $date1 = date_create("".$dtl.""); $date2 = date_create("".$dt2.""); $dateDiff = date_diff($date2, $date1); $probDays = $dateDiff->days; $probMon = $dateDiff->m; $probYear = $dateDiff->y; $month = $probDays / 30; $totLeave = $month * 1; if($month > $probmon) { $totLeave = $totLeave + 1; } ?>
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '$dt2' (T_VARIABLE) in /in/OVmRI on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/OVmRI on line 3
Process exited with code 255.