3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<? php $start = "11:00"; $end = "13:30"; $tStart = strtotime($start); $tEnd = strtotime($end); $tNow = $tStart; while($tNow <= $tEnd){ echo date("H:i",$tNow)."\n"; $tNow = strtotime('+30 minutes',$tNow); } ?>
Output for 5.4.0 - 5.5.12
Parse error: syntax error, unexpected '$start' (T_VARIABLE) in /in/0Z2iH on line 1
Process exited with code 255.
Output for 5.3.0 - 5.3.29
<? php $start = "11:00"; $end = "13:30"; $tStart = strtotime($start); $tEnd = strtotime($end); $tNow = $tStart; while($tNow <= $tEnd){ echo date("H:i",$tNow)."\n"; $tNow = strtotime('+30 minutes',$tNow); } ?>