3v4l.org

run code in 300+ PHP versions simultaneously
<?php $set_of_numbers = "1,2,4,5,9"; $numbers = explode(",", $set_of_numbers); $range = range(1,12); $numbers_to_output = array_diff($range, $numbers); // [3,6,7,8,10,11,12] foreach($numbers_to_output as $n){ echo '<option value='.$n.'>'.$n."</option>\n"; }
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
<option value=3>3</option> <option value=6>6</option> <option value=7>7</option> <option value=8>8</option> <option value=10>10</option> <option value=11>11</option> <option value=12>12</option>

preferences:
77.54 ms | 407 KiB | 5 Q