3v4l.org

run code in 500+ PHP versions simultaneously
<?php $kat_list=array(1,2,3,4); shuffle($kat_list); // shuffle list $count=3; for($i=0; $i<$count; ++$i) { // get the first N items of the shuffled list printf("%d ", $kat_list[$i]); }

preferences:
22.86 ms | 476 KiB | 4 Q