3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $range = range(strtotime($initime),strtotime($endtime),30*60); foreach($range as $time){ echo '<option value="'.$time.'">'.date("H:i",$time).'</option>'."\r\n"; } $range = range(strtotime("today 00:15"),strtotime("today 04:00"),15*60); foreach($range as $time){ echo '<option value="'.$time.'">'.date("H:i",$time).'</option>'."\r\n"; }
Output for 5.1.2 - 7.1.0
Notice: Undefined variable: initime in /in/KdQSK on line 2 Notice: Undefined variable: endtime in /in/KdQSK on line 2 <option value="0">01:00</option> <option value="1404857700">00:15</option> <option value="1404858600">00:30</option> <option value="1404859500">00:45</option> <option value="1404860400">01:00</option> <option value="1404861300">01:15</option> <option value="1404862200">01:30</option> <option value="1404863100">01:45</option> <option value="1404864000">02:00</option> <option value="1404864900">02:15</option> <option value="1404865800">02:30</option> <option value="1404866700">02:45</option> <option value="1404867600">03:00</option> <option value="1404868500">03:15</option> <option value="1404869400">03:30</option> <option value="1404870300">03:45</option> <option value="1404871200">04:00</option>
Output for 5.1.0 - 5.1.1
Notice: Undefined variable: initime in /in/KdQSK on line 2 Notice: Undefined variable: endtime in /in/KdQSK on line 2 <option value="1404898497">11:34</option> <option value="1404857700">00:15</option> <option value="1404858600">00:30</option> <option value="1404859500">00:45</option> <option value="1404860400">01:00</option> <option value="1404861300">01:15</option> <option value="1404862200">01:30</option> <option value="1404863100">01:45</option> <option value="1404864000">02:00</option> <option value="1404864900">02:15</option> <option value="1404865800">02:30</option> <option value="1404866700">02:45</option> <option value="1404867600">03:00</option> <option value="1404868500">03:15</option> <option value="1404869400">03:30</option> <option value="1404870300">03:45</option> <option value="1404871200">04:00</option>
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: initime in /in/KdQSK on line 2 Warning: strtotime(): Called with an empty time parameter. in /in/KdQSK on line 2 Notice: Undefined variable: endtime in /in/KdQSK on line 2 Warning: strtotime(): Called with an empty time parameter. in /in/KdQSK on line 2 <option value="-1">00:59</option> <option value="1404857700">00:15</option> <option value="1404858600">00:30</option> <option value="1404859500">00:45</option> <option value="1404860400">01:00</option> <option value="1404861300">01:15</option> <option value="1404862200">01:30</option> <option value="1404863100">01:45</option> <option value="1404864000">02:00</option> <option value="1404864900">02:15</option> <option value="1404865800">02:30</option> <option value="1404866700">02:45</option> <option value="1404867600">03:00</option> <option value="1404868500">03:15</option> <option value="1404869400">03:30</option> <option value="1404870300">03:45</option> <option value="1404871200">04:00</option>
Output for 5.0.1 - 5.0.3
Notice: Undefined variable: initime in /in/KdQSK on line 2 Warning: strtotime(): Called with an empty time parameter. in /in/KdQSK on line 2 Notice: Undefined variable: endtime in /in/KdQSK on line 2 Warning: strtotime(): Called with an empty time parameter. in /in/KdQSK on line 2 <option value="-1">00:59</option> <option value="1404857700">00:15</option> <option value="1404858600">00:30</option> <option value="1404859500">00:45</option> <option value="1404860400">01:00</option> <option value="1404861300">01:15</option> <option value="1404862200">01:30</option> <option value="1404863100">01:45</option> <option value="1404864000">02:00</option> <option value="1404864900">02:15</option> <option value="1404865800">02:30</option> <option value="1404866700">02:45</option> <option value="1404867600">03:00</option> <option value="1404868500">03:15</option> <option value="1404869400">03:30</option> <option value="1404870300">03:45</option> <option value="1404871200">04:00</option>
Output for 5.0.0
Notice: Undefined variable: initime in /in/KdQSK on line 2 Notice: strtotime(): Called with empty time parameter in /in/KdQSK on line 2 Notice: Undefined variable: endtime in /in/KdQSK on line 2 Notice: strtotime(): Called with empty time parameter in /in/KdQSK on line 2 <option value="1404856800">00:00</option> <option value="1404857700">00:15</option> <option value="1404858600">00:30</option> <option value="1404859500">00:45</option> <option value="1404860400">01:00</option> <option value="1404861300">01:15</option> <option value="1404862200">01:30</option> <option value="1404863100">01:45</option> <option value="1404864000">02:00</option> <option value="1404864900">02:15</option> <option value="1404865800">02:30</option> <option value="1404866700">02:45</option> <option value="1404867600">03:00</option> <option value="1404868500">03:15</option> <option value="1404869400">03:30</option> <option value="1404870300">03:45</option> <option value="1404871200">04:00</option>
Output for 4.3.2 - 4.3.10, 4.4.0 - 4.4.9
Notice: Undefined variable: initime in /in/KdQSK on line 2 Notice: strtotime(): Called with empty time parameter in /in/KdQSK on line 2 Notice: Undefined variable: endtime in /in/KdQSK on line 2 Notice: strtotime(): Called with empty time parameter in /in/KdQSK on line 2 Warning: Wrong parameter count for range() in /in/KdQSK on line 2 Warning: Invalid argument supplied for foreach() in /in/KdQSK on line 3 Warning: Wrong parameter count for range() in /in/KdQSK on line 7 Warning: Invalid argument supplied for foreach() in /in/KdQSK on line 8
Output for 4.3.11
Notice: Undefined variable: initime in /in/KdQSK on line 2 Notice: strtotime(): Called with empty time parameter in /in/KdQSK on line 2 Notice: Undefined variable: endtime in /in/KdQSK on line 2 Notice: strtotime(): Called with empty time parameter in /in/KdQSK on line 2 Warning: Wrong parameter count for range() in /in/KdQSK on line 2 Warning: Wrong parameter count for range() in /in/KdQSK on line 7
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: initime in /in/KdQSK on line 2 Notice: strtotime() [http://www.php.net/function.strtotime]: Called with empty time parameter in /in/KdQSK on line 2 Notice: Undefined variable: endtime in /in/KdQSK on line 2 Notice: strtotime() [http://www.php.net/function.strtotime]: Called with empty time parameter in /in/KdQSK on line 2 Warning: Wrong parameter count for range() in /in/KdQSK on line 2 Warning: Invalid argument supplied for foreach() in /in/KdQSK on line 3 Warning: Wrong parameter count for range() in /in/KdQSK on line 7 Warning: Invalid argument supplied for foreach() in /in/KdQSK on line 8