3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = array(); foreach (range(0,23) as $fullhour) { $parthour = $fullhour > 12 ? $fullhour - 12 : $fullhour; $sufix = $fullhour > 11 ? " pm" : " am"; $options["$fullhour:00"] = $parthour.":00".$sufix; $options["$fullhour:30"] = $parthour.":30".$sufix; } ?>

preferences:
34.97 ms | 402 KiB | 5 Q