3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $start_stamp = date("c", $eachOffDuty['startTime']); $start_date = new DateTime($start_stamp); $end_stamp = date("c", $eachOffDuty['endTime']); $end_date = new DateTime($end_stamp); $duration = date_diff($start_date, $end_date);
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
Notice: Undefined variable: eachOffDuty in /in/EDbV7 on line 2 Notice: Undefined variable: eachOffDuty in /in/EDbV7 on line 4
Output for hhvm-3.15.4
Notice: Undefined variable: eachOffDuty in /in/EDbV7 on line 2 Warning: date() expects parameter 2 to be integer, null given in /in/EDbV7 on line 2 Notice: Undefined variable: eachOffDuty in /in/EDbV7 on line 4 Warning: date() expects parameter 2 to be integer, null given in /in/EDbV7 on line 4