3v4l.org

run code in 300+ 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:
41.48 ms | 405 KiB | 5 Q