3v4l.org

run code in 300+ PHP versions simultaneously
<?php $temp = array("a"=>"aa", "b"=>"bb", "c"=>"cc"); // var_dump(array_intersect_key( $temp, array_flip( array_rand( $temp, 1 ) ) )); // $array = array("one", "two", "three", "four", "five", "six"); // print_r($array[array_rand($array, 2)]); // $ran = array(1,2,3,4); // $randomElement = $temp[array_rand($temp, 2)]; //var_dump($randomElement); $temp_guild_mission = array_rand(array_flip($temp), 2); var_dump($temp_guild_mission);

preferences:
31.3 ms | 402 KiB | 5 Q