3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rst = array(1, 5, 7, 8, 9, 10, 11, 12, 15, 17, 22, 23, 27, 30, 33, 34, 37); for ($i = 1; $i <= 39; $i++) { if (in_array($i, $rst)) { continue; } $arr[] = $i; } $a = mt_rand(1, sizeof($arr)); echo $arr[$a-1] . "\n";

preferences:
32.92 ms | 402 KiB | 5 Q