3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 0 => 2, 1 => 7, 2 => 5, 3 => 2, 4 => 2, 5 => 3 ]; echo array_rand(array_flip(array_keys ($a, min($a))));

preferences:
23.54 ms | 407 KiB | 5 Q