3v4l.org

run code in 300+ PHP versions simultaneously
<?php const WEEKDAYS = ['M', 'T', 'W', 'Th', 'F', 'S', 'Su']; foreach (WEEKDAYS as $weekdayKey => $weekday) { echo '<div class="form-check form-check-inline">' . PHP_EOL . ' <input class="form-check-input" type="checkbox" id="classDays' . $weekdayKey . '" name="classDays[]" value="' . $weekday . '">' . PHP_EOL . ' <label class="form-check-label" for="classDays[]">' . PHP_EOL . ' ' . date('l', strtotime('2022-01-0' . ($weekdayKey + 3))) . PHP_EOL . ' </label>' . PHP_EOL . '</div>' . PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
<div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" id="classDays0" name="classDays[]" value="M"> <label class="form-check-label" for="classDays[]"> Monday </label> </div> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" id="classDays1" name="classDays[]" value="T"> <label class="form-check-label" for="classDays[]"> Tuesday </label> </div> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" id="classDays2" name="classDays[]" value="W"> <label class="form-check-label" for="classDays[]"> Wednesday </label> </div> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" id="classDays3" name="classDays[]" value="Th"> <label class="form-check-label" for="classDays[]"> Thursday </label> </div> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" id="classDays4" name="classDays[]" value="F"> <label class="form-check-label" for="classDays[]"> Friday </label> </div> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" id="classDays5" name="classDays[]" value="S"> <label class="form-check-label" for="classDays[]"> Saturday </label> </div> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" id="classDays6" name="classDays[]" value="Su"> <label class="form-check-label" for="classDays[]"> Sunday </label> </div>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
47.51 ms | 405 KiB | 8 Q